Skip to content

Commit

Permalink
Updating major versions of pgx and spanner drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Sep 18, 2022
1 parent d5db12e commit 4ffe786
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 59 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -236,12 +236,12 @@ associated database, scheme / build tag, and scheme aliases:
| Firebird | `firebird` | `fb`, `firebirdsql` | [github.com/nakagami/firebirdsql][d-firebird] |
| Genji | `genji` | `gj` | [github.com/genjidb/genji/driver][d-genji] |
| Google BigQuery | `bigquery` | `bq` | [gorm.io/driver/bigquery/driver][d-bigquery] |
| Google Spanner | `spanner` | `sp` | [github.com/cloudspannerecosystem/go-sql-spanner][d-spanner] |
| Google Spanner | `spanner` | `sp` | [github.com/googleapis/go-sql-spanner][d-spanner] |
| Microsoft ADODB | `adodb` | `ad`, `ado` | [github.com/mattn/go-adodb][d-adodb] |
| ModernC SQLite3 | `moderncsqlite` | `mq`, `modernsqlite` | [modernc.org/sqlite][d-moderncsqlite] |
| MySQL MyMySQL | `mymysql` | `zm`, `mymy` | [github.com/ziutek/mymysql/godrv][d-mymysql] |
| Netezza | `netezza` | `nz`, `nzgo` | [github.com/IBM/nzgo/v14][d-netezza] |
| PostgreSQL PGX | `pgx` | `px` | [github.com/jackc/pgx/v4/stdlib][d-pgx] |
| PostgreSQL PGX | `pgx` | `px` | [github.com/jackc/pgx/v5/stdlib][d-pgx] |
| Presto | `presto` | `pr`, `prs`, `prestos`, `prestodb`, `prestodbs` | [github.com/prestodb/presto-go-client/presto][d-presto] |
| SAP ASE | `sapase` | `ax`, `ase`, `tds` | [github.com/thda/tds][d-sapase] |
| SAP HANA | `saphana` | `sa`, `sap`, `hana`, `hdb` | [github.com/SAP/go-hdb/driver][d-saphana] |
Expand Down Expand Up @@ -301,7 +301,7 @@ associated database, scheme / build tag, and scheme aliases:
[d-sapase]: https://github.com/thda/tds
[d-saphana]: https://github.com/SAP/go-hdb
[d-snowflake]: https://github.com/snowflakedb/gosnowflake
[d-spanner]: https://github.com/cloudspannerecosystem/go-sql-spanner
[d-spanner]: https://github.com/googleapis/go-sql-spanner
[d-sqlite3]: https://github.com/mattn/go-sqlite3
[d-sqlserver]: https://github.com/microsoft/go-mssqldb
[d-trino]: https://github.com/trinodb/trino-go-client
Expand Down
5 changes: 2 additions & 3 deletions drivers/pgx/pgx.go
Expand Up @@ -12,8 +12,8 @@ import (
"strings"

"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/stdlib" // DRIVER
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/stdlib" // DRIVER
"github.com/xo/usql/drivers"
"github.com/xo/usql/drivers/metadata"
pgmeta "github.com/xo/usql/drivers/metadata/postgres"
Expand Down Expand Up @@ -55,7 +55,6 @@ func init() {
return metadata.NewDefaultWriter(pgmeta.NewReader()(db, opts...))(db, w)
},
Copy: func(ctx context.Context, db *sql.DB, rows *sql.Rows, table string) (int64, error) {

conn, err := db.Conn(context.Background())
if err != nil {
return 0, fmt.Errorf("failed to get a connection from pool: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions drivers/spanner/spanner.go
@@ -1,10 +1,10 @@
// Package spanner defines and registers usql's Google Spanner driver.
//
// See: https://github.com/cloudspannerecosystem/go-sql-spanner
// See: https://github.com/googleapis/go-sql-spanner
package spanner

import (
_ "github.com/cloudspannerecosystem/go-sql-spanner" // DRIVER
_ "github.com/googleapis/go-sql-spanner" // DRIVER
"github.com/xo/usql/drivers"
)

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Expand Up @@ -16,7 +16,6 @@ require (
github.com/apache/calcite-avatica-go/v5 v5.1.0
github.com/bippio/go-impala v2.1.0+incompatible
github.com/btnguyen2k/gocosmos v0.1.6
github.com/cloudspannerecosystem/go-sql-spanner v0.0.0-20220112050259-970f6ba5045e
github.com/couchbase/go_n1ql v0.0.0-20220303011133-0ed4bf93e31d
github.com/docker/docker v20.10.17+incompatible
github.com/exasol/exasol-driver-go v0.4.5
Expand All @@ -27,8 +26,10 @@ require (
github.com/gohxs/readline v0.0.0-20171011095936-a780388e6e7c
github.com/google/go-cmp v0.5.9
github.com/google/goexpect v0.0.0-20210430020637-ab937bf7fd6f
github.com/googleapis/go-sql-spanner v1.0.0
github.com/jackc/pgconn v1.13.0
github.com/jackc/pgx/v4 v4.17.2
github.com/jackc/pgx/v5 v5.0.0
github.com/jeandeaual/go-locale v0.0.0-20220711133428-7de61946b173
github.com/jmrobles/h2go v0.5.0
github.com/lib/pq v1.10.7
github.com/mattn/go-adodb v0.0.1
Expand Down Expand Up @@ -130,7 +131,7 @@ require (
github.com/docker/go-units v0.4.0 // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.3 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.8 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect
github.com/exasol/error-reporting-go v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
Expand Down Expand Up @@ -165,7 +166,6 @@ require (
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
Expand Down

0 comments on commit 4ffe786

Please sign in to comment.