diff --git a/update.go b/update.go index 654f8b8..75afeed 100644 --- a/update.go +++ b/update.go @@ -189,6 +189,10 @@ func (b *UpdateBuilder) ToSql() (string, []interface{}) { // Exec executes the statement represented by the UpdateBuilder // It returns the raw database/sql Result and an error if there was one 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() fullSql, err := Interpolate(sql, args) @@ -207,7 +211,3 @@ func (b *UpdateBuilder) Exec() (sql.Result, error) { return result, nil } - -func (b *UpdateBuilder) ExecContext(ctx context.Context) (sql.Result, error) { - return nil, nil -}