Skip to content

Commit 575a46e

Browse files
committed
Support pgx versioned names
This commit supports the driver names pgx/v4 and pgx/v5. These aliases of different versions of pgx allow loading the proper driver if a dependency of a project imports a different one. Signed-off-by: Mariano Cano <[email protected]>
1 parent 8d836f2 commit 575a46e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bind.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const (
2222
)
2323

2424
var defaultBinds = map[int][]string{
25-
DOLLAR: []string{"postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach"},
25+
DOLLAR: []string{"postgres", "pgx", "pgx/v4", "pgx/v5", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach"},
2626
QUESTION: []string{"mysql", "sqlite3", "nrmysql", "nrsqlite3"},
2727
NAMED: []string{"oci8", "ora", "goracle", "godror"},
2828
AT: []string{"sqlserver"},

bind_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
func oldBindType(driverName string) int {
99
switch driverName {
10-
case "postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql":
10+
case "postgres", "pgx", "pgx/v4", "pgx/v5", "pq-timeouts", "cloudsqlpostgres", "ql":
1111
return DOLLAR
1212
case "mysql":
1313
return QUESTION

0 commit comments

Comments
 (0)