diff options
Diffstat (limited to 'model/db_mysql.go')
-rw-r--r-- | model/db_mysql.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/model/db_mysql.go b/model/db_mysql.go new file mode 100644 index 0000000..b236214 --- /dev/null +++ b/model/db_mysql.go @@ -0,0 +1,33 @@ +//go:build !sqlite + +// 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, + } +} |