From b3485c78114e505b7bc9c6969afa108ea3f4755c Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 14 Feb 2024 23:38:53 +0100 Subject: Remove sqlite support: the differences with sqlc just get too cumbersome --- model/db.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 model/db.go (limited to 'model/db.go') diff --git a/model/db.go b/model/db.go new file mode 100644 index 0000000..2e42192 --- /dev/null +++ b/model/db.go @@ -0,0 +1,31 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.25.0 + +package model + +import ( + "context" + "database/sql" +) + +type DBTX interface { + ExecContext(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext(context.Context, string) (*sql.Stmt, error) + QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext(context.Context, string, ...interface{}) *sql.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx *sql.Tx) *Queries { + return &Queries{ + db: tx, + } +} -- cgit v1.2.3-70-g09d2