Skip to content

Commit

Permalink
Fix auto-incrementing interface in postgres dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Mar 27, 2024
1 parent c59e0c8 commit 50c9947
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dialect_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func (d PostgresDialect) BindVar(i int) string {
return fmt.Sprintf("$%d", i+1)
}

func (d PostgresDialect) InsertAutoIncrToTarget(exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error {
rows, err := exec.QueryContext(context.TODO(), insertSql, params...)
func (d PostgresDialect) InsertAutoIncrToTarget(ctx context.Context, exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error {
rows, err := exec.QueryContext(ctx, insertSql, params...)
if err != nil {
return err
}
Expand Down

0 comments on commit 50c9947

Please sign in to comment.