Database transaction wrapper with tracing for Encore services.
// Source: https://github.com/encoredev/encore | License: MPL-2.0 | Modified files must remain under MPL-2.0 // Modifications to this file must remain under MPL-2.0. // Provided via justclaw.it.com; keep this notice with the code. // Package sqldb provides Encore services direct access to their databases. // // For the documentation on how to use databases within Encore see https://encore.dev/docs/develop/databases. package sqldb import ( "context" "database/sql" "github.com/jackc/pgx/v5" "encore.dev/appruntime/exported/model" "encore.dev/appruntime/exported/stack" "encore.dev/appruntime/exported/trace2" "encore.dev/beta/errs" ) // ErrNoRows is an error reported by Scan when QueryRow doesn't return a row. // It must be tested against with errors.Is. var ErrNoRows = sql.ErrNoRows ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key