import 'package:drift/drift.dart'; class SqlLoggingInterceptor extends QueryInterceptor { @override Future>> runSelect( QueryExecutor executor, String statement, List args, ) { print('[Drift] SELECT: $statement | args: $args'); return executor.runSelect(statement, args); } @override Future runInsert( QueryExecutor executor, String statement, List args, ) { print('[Drift] INSERT: $statement | args: $args'); return executor.runInsert(statement, args); } @override Future runUpdate( QueryExecutor executor, String statement, List args, ) { print('[Drift] UPDATE: $statement | args: $args'); return executor.runUpdate(statement, args); } @override Future runDelete( QueryExecutor executor, String statement, List args, ) { print('[Drift] DELETE: $statement | args: $args'); return executor.runDelete(statement, args); } @override Future runCustom( QueryExecutor executor, String statement, List args, ) { print('[Drift] CUSTOM: $statement | args: $args'); return executor.runCustom(statement, args); } @override Future runBatched( QueryExecutor executor, BatchedStatements statements, ) { for (final s in statements.statements) { print('[Drift] BATCHED: $s'); } return executor.runBatched(statements); } }