From bfdc9c345630eb7ea8a6f482571af667285a0d5f Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Wed, 27 Mar 2024 13:39:24 -0700 Subject: [PATCH] Adjust to current package --- dialect_postgres.go | 5 +++-- dialect_postgres_test.go | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dialect_postgres.go b/dialect_postgres.go index 7a9c50bf..b18a8f21 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 f9dc1c2f..f4b18dc4 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"