diff --git a/README.md b/README.md index bcb07477d8d..dd6bb5a8ef8 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ associated database, scheme / build tag, and scheme aliases: [d-adodb]: https://github.com/mattn/go-adodb [d-athena]: https://github.com/uber/athenadriver [d-avatica]: https://github.com/apache/calcite-avatica-go -[d-bigquery]: https://github.com/go-gorm/gorm +[d-bigquery]: https://github.com/go-gorm/bigquery [d-cassandra]: https://github.com/MichaelS11/go-cql-driver [d-clickhouse]: https://github.com/ClickHouse/clickhouse-go [d-cosmos]: https://github.com/btnguyen2k/gocosmos diff --git a/drivers/bigquery/bigquery.go b/drivers/bigquery/bigquery.go index 6266b6fe8c0..cd4680b52cd 100644 --- a/drivers/bigquery/bigquery.go +++ b/drivers/bigquery/bigquery.go @@ -1,6 +1,6 @@ // Package bigquery defines and registers usql's Google BigQuery driver. // -// See: https://github.com/go-gorm/gorm +// See: https://github.com/go-gorm/bigquery package bigquery import ( diff --git a/drivers/sqlserver/sqlserver.go b/drivers/sqlserver/sqlserver.go index 6b592b73f11..d4e93180550 100644 --- a/drivers/sqlserver/sqlserver.go +++ b/drivers/sqlserver/sqlserver.go @@ -6,15 +6,12 @@ package sqlserver import ( "context" - "database/sql" "fmt" "io" "strconv" "strings" sqlserver "github.com/microsoft/go-mssqldb" // DRIVER - "github.com/microsoft/go-mssqldb/azuread" - "github.com/xo/dburl" "github.com/xo/usql/drivers" "github.com/xo/usql/drivers/metadata" ) @@ -24,15 +21,6 @@ func init() { AllowMultilineComments: true, RequirePreviousPassword: true, LexerName: "tsql", - Open: func(u *dburl.URL, _, _ func() io.Writer) (func(string, string) (*sql.DB, error), error) { - return func(_ string, params string) (*sql.DB, error) { - driver := "sqlserver" - if u.Query().Has("fedauth") { - driver = azuread.DriverName - } - return sql.Open(driver, params) - }, nil - }, Version: func(ctx context.Context, db drivers.DB) (string, error) { var ver, level, edition string err := db.QueryRowContext( diff --git a/go.mod b/go.mod index 8290ce6f9fd..37d972dfb95 100644 --- a/go.mod +++ b/go.mod @@ -50,7 +50,7 @@ require ( github.com/trinodb/trino-go-client v0.310.0 github.com/uber/athenadriver v1.1.14 github.com/vertica/vertica-sql-go v1.3.1 - github.com/xo/dburl v0.13.0 + github.com/xo/dburl v0.13.1 github.com/xo/tblfmt v0.10.1 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e github.com/yookoala/realpath v1.0.0 @@ -108,8 +108,8 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect github.com/aws/smithy-go v1.13.5 // indirect - github.com/beltran/gohive v1.5.3 // indirect - github.com/beltran/gosasl v0.0.0-20220904020400-625f43db35e0 // indirect + github.com/beltran/gohive v1.5.4 // indirect + github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833 // indirect github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btnguyen2k/consu/checksum v0.1.2 // indirect @@ -290,3 +290,5 @@ require ( modernc.org/token v1.1.0 // indirect modernc.org/zappy v1.0.6 // indirect ) + +replace github.com/google/flatbuffers => github.com/google/flatbuffers v0.0.0-20230110200425-62e4d2e5b215 diff --git a/go.sum b/go.sum index 5ab046562c6..4c93ecf2b0c 100644 --- a/go.sum +++ b/go.sum @@ -252,11 +252,11 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8Ncjj github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/beltran/gohive v1.5.3 h1:fGvLt4IoVbXMbg4B14igkwCd435ODug95C9tQcbKCmg= -github.com/beltran/gohive v1.5.3/go.mod h1:BJbXAhof7gWk5+kl0y6Ox8TFDJ1xv6gwDksF7l15LFI= +github.com/beltran/gohive v1.5.4 h1:Zb6VkqsDP0QhefL2A5vnKC0p5opIAbU8D57aTA8H3II= +github.com/beltran/gohive v1.5.4/go.mod h1:BJbXAhof7gWk5+kl0y6Ox8TFDJ1xv6gwDksF7l15LFI= github.com/beltran/gosasl v0.0.0-20200715011608-d5475aebb293/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= -github.com/beltran/gosasl v0.0.0-20220904020400-625f43db35e0 h1:0+69UIVi5lyyhIZxjp5tnFcD1D8b0j723xgo5kM3P/I= -github.com/beltran/gosasl v0.0.0-20220904020400-625f43db35e0/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= +github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833 h1:3mDCea/Jo3bCaS62fNuKeNai/zaNjSOjU4hQ6SWixnU= +github.com/beltran/gosasl v0.0.0-20230115020419-e3b503e58833/go.mod h1:Qx8cW6jkI8riyzmklj80kAIkv+iezFUTBiGU0qHhHes= github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab h1:ayfcn60tXOSYy5zUN1AMSTQo4nJCf7hrdzAVchpPst4= github.com/beltran/gssapi v0.0.0-20200324152954-d86554db4bab/go.mod h1:GLe4UoSyvJ3cVG+DVtKen5eAiaD8mAJFuV5PT3Eeg9Q= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= @@ -723,7 +723,7 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v0.0.0-20230110200425-62e4d2e5b215/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers/go v0.0.0-20230110200425-62e4d2e5b215 h1:HA3/6NDG1q6qLD2sCqDFT/ua/1/wctoLo7leuFcFdSE= github.com/google/flatbuffers/go v0.0.0-20230110200425-62e4d2e5b215/go.mod h1:qmRCJW6OqZkfBt584Cmq1im0f4367CLrdABrq5lMOWo= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -1357,8 +1357,8 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xo/dburl v0.13.0 h1:kq+oD1j/m8DnJ/p6G/LQXRosVchs8q5/AszEUKkvYfo= -github.com/xo/dburl v0.13.0/go.mod h1:K6rSPgbVqP3ZFT0RHkdg/M3M5KhLeV2MaS/ZqaLd1kA= +github.com/xo/dburl v0.13.1 h1:EV+BCdo539sc/mBrny0VxaEGLM0b1U0mJA9RpP80ux0= +github.com/xo/dburl v0.13.1/go.mod h1:B7/G9FGungw6ighV8xJNwWYQPMfn3gsi2sn5SE8Bzco= github.com/xo/tblfmt v0.0.0-20190609041254-28c54ec42ce8/go.mod h1:3U5kKQdIhwACye7ml3acccHmjGExY9WmUGU7rnDWgv0= github.com/xo/tblfmt v0.10.1 h1:Nw8A/4aKQbA1XY5N62ZmoBOwK1YI9ixF4Wi1yLdiUwE= github.com/xo/tblfmt v0.10.1/go.mod h1:vJm27N/x4E7avH7MvmBvIF/mGpsmKep5DP27QXHUurU=