Skip to content

Commit

Permalink
Extend Tr interface in sqlx/contract.go by missing methods (#90)
Browse files Browse the repository at this point in the history
* fix Tr interface in sqlx/contract.go
(add missing methods of sqlx Tx/DB)
  • Loading branch information
Zeryoshka authored Nov 10, 2023
1 parent f320b6f commit 4c01d68
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sqlx/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ import (
type Tr interface {
sqlx.ExtContext

sqlx.Preparer
Preparex(query string) (*sqlx.Stmt, error)
PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)
PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
PrepareNamed(query string) (*sqlx.NamedStmt, error)
PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)

sqlx.Execer
MustExec(query string, args ...interface{}) sql.Result
MustExecContext(ctx context.Context, query string, args ...interface{}) sql.Result
NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error)
NamedExec(query string, arg interface{}) (sql.Result, error)
NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error)

Queryx(query string, args ...interface{}) (*sqlx.Rows, error)
QueryRowx(query string, args ...interface{}) *sqlx.Row
sqlx.Queryer
QueryRow(query string, args ...interface{}) *sql.Row
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)

Expand Down

0 comments on commit 4c01d68

Please sign in to comment.