diff --git a/dialect_postgres.go b/dialect_postgres.go index 7a9c50b..b18a8f2 100644 --- a/dialect_postgres.go +++ b/dialect_postgres.go @@ -2,9 +2,10 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package gorp +package borp import ( + "context" "fmt" "reflect" "strings" @@ -103,7 +104,7 @@ func (d PostgresDialect) BindVar(i int) string { } func (d PostgresDialect) InsertAutoIncrToTarget(exec SqlExecutor, insertSql string, target interface{}, params ...interface{}) error { - rows, err := exec.Query(insertSql, params...) + rows, err := exec.QueryContext(context.TODO(), insertSql, params...) if err != nil { return err } diff --git a/dialect_postgres_test.go b/dialect_postgres_test.go index f9dc1c2..f4b18dc 100644 --- a/dialect_postgres_test.go +++ b/dialect_postgres_test.go @@ -2,9 +2,10 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !integration // +build !integration -package gorp_test +package borp_test import ( "database/sql" @@ -12,7 +13,7 @@ import ( "testing" "time" - "github.com/go-gorp/gorp/v3" + "github.com/letsencrypt/borp" "github.com/poy/onpar" "github.com/poy/onpar/expect" "github.com/poy/onpar/matchers"