Add support to retrieve Rows from statement

Rows statement method executes statements over db connection/transaction and returns Rows.
This commit is contained in:
go-jet 2021-05-16 18:46:50 +02:00
parent a5b7769589
commit 3021a6a0fd
7 changed files with 248 additions and 10 deletions

View file

@ -5,7 +5,8 @@ import (
"database/sql"
)
// DB is common database interface used by jet execution
// DB is common database interface used by query result mapping
// Both *sql.DB and *sql.Tx implements DB interface
type DB interface {
Exec(query string, args ...interface{}) (sql.Result, error)
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)