|
|
|
@ -30,6 +30,10 @@ func (gs *SessionDB) Select(ctx context.Context, dest interface{}, query string, |
|
|
|
|
return gs.sqlxdb.SelectContext(ctx, dest, gs.sqlxdb.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (gs *SessionDB) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) { |
|
|
|
|
return gs.sqlxdb.QueryContext(ctx, gs.sqlxdb.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (gs *SessionDB) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error) { |
|
|
|
|
return gs.sqlxdb.ExecContext(ctx, gs.sqlxdb.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
@ -80,6 +84,10 @@ func (gtx *SessionTx) Exec(ctx context.Context, query string, args ...interface{ |
|
|
|
|
return gtx.sqlxtx.ExecContext(ctx, gtx.sqlxtx.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (gtx *SessionTx) Query(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) { |
|
|
|
|
return gtx.sqlxtx.QueryContext(ctx, gtx.sqlxtx.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (gtx *SessionTx) Get(ctx context.Context, dest interface{}, query string, args ...interface{}) error { |
|
|
|
|
return gtx.sqlxtx.GetContext(ctx, dest, gtx.sqlxtx.Rebind(query), args...) |
|
|
|
|
} |
|
|
|
|