[Bug] Statement Query and Exec methods can not be used with sql.Conn
This commit is contained in:
parent
84dbda5948
commit
3b0285cc4b
4 changed files with 71 additions and 18 deletions
10
qrm/db.go
10
qrm/db.go
|
|
@ -13,3 +13,13 @@ type DB interface {
|
|||
Query(query string, args ...interface{}) (*sql.Rows, error)
|
||||
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
|
||||
}
|
||||
|
||||
// Queryable interface for sql QueryContext method
|
||||
type Queryable interface {
|
||||
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
|
||||
}
|
||||
|
||||
// Executable interface for sql ExecContext method
|
||||
type Executable interface {
|
||||
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue