Move code from UpdateBuilder.Exec to UpdateBuilder.ExecContext

This commit is contained in:
v.veselskiy 2022-11-24 14:30:50 +03:00
parent 900ce23197
commit 26a0aaaf27
1 changed files with 4 additions and 4 deletions

View File

@ -189,6 +189,10 @@ func (b *UpdateBuilder) ToSql() (string, []interface{}) {
// Exec executes the statement represented by the UpdateBuilder // Exec executes the statement represented by the UpdateBuilder
// It returns the raw database/sql Result and an error if there was one // It returns the raw database/sql Result and an error if there was one
func (b *UpdateBuilder) Exec() (sql.Result, error) { func (b *UpdateBuilder) Exec() (sql.Result, error) {
return b.ExecContext(context.Background())
}
func (b *UpdateBuilder) ExecContext(ctx context.Context) (sql.Result, error) {
sql, args := b.ToSql() sql, args := b.ToSql()
fullSql, err := Interpolate(sql, args) fullSql, err := Interpolate(sql, args)
@ -207,7 +211,3 @@ func (b *UpdateBuilder) Exec() (sql.Result, error) {
return result, nil return result, nil
} }
func (b *UpdateBuilder) ExecContext(ctx context.Context) (sql.Result, error) {
return nil, nil
}