2
0

Remove Ex versions of Query and QueryRow

Always require context and prepend options to arguments if necessary.
This commit is contained in:
Jack Christensen
2019-04-10 12:12:22 -05:00
parent b69179cebb
commit 7718ee6207
26 changed files with 217 additions and 353 deletions
+2 -2
View File
@@ -538,7 +538,7 @@ func TestTxBeginBatch(t *testing.T) {
tx.Commit()
var count int
conn.QueryRow("select count(1) from ledger1 where id = $1", id).Scan(&count)
conn.QueryRow(context.Background(), "select count(1) from ledger1 where id = $1", id).Scan(&count)
if count != 1 {
t.Errorf("count => %v, want %v", count, 1)
}
@@ -583,7 +583,7 @@ func TestTxBeginBatchRollback(t *testing.T) {
batch.Close()
tx.Rollback()
row := conn.QueryRow("select count(1) from ledger1 where id = $1", id)
row := conn.QueryRow(context.Background(), "select count(1) from ledger1 where id = $1", id)
var count int
row.Scan(&count)
if count != 0 {