dbw
provides a few ways to get debug output from the underlying database.
// enable debug output for all database operations
db, err := dbw.Open(dbw.Sqlite, "dbw.db")
db.Debug(true)
Operations may take the WithDebug(...) option which will enable/disable debug output for the duration of that operation.
// enable debug output for a create operation
rw.Create(ctx, &user, dbw.WithDebug(true))