Statements execution with context.

This commit is contained in:
go-jet 2019-06-20 12:22:19 +02:00
parent cdfd8f1dff
commit 1ac324e198
11 changed files with 146 additions and 28 deletions

View file

@ -1,6 +1,7 @@
package sqlbuilder
import (
"context"
"database/sql"
"github.com/go-jet/jet/sqlbuilder/execution"
"github.com/pkg/errors"
@ -96,6 +97,14 @@ func (l *lockStatementImpl) Query(db execution.Db, destination interface{}) erro
return Query(l, db, destination)
}
func (l *lockStatementImpl) QueryContext(db execution.Db, context context.Context, destination interface{}) error {
return QueryContext(l, db, context, destination)
}
func (l *lockStatementImpl) Exec(db execution.Db) (sql.Result, error) {
return Exec(l, db)
}
func (l *lockStatementImpl) ExecContext(db execution.Db, context context.Context) (res sql.Result, err error) {
return ExecContext(l, db, context)
}