Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drivers completions #481

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ require (
github.com/jackc/pgx/v5 v5.6.0
github.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49
github.com/jmrobles/h2go v0.5.0
github.com/kenshaw/colors v0.1.6
github.com/kenshaw/rasterm v0.1.10
github.com/lib/pq v1.10.9
github.com/marcboeker/go-duckdb v1.7.0
Expand All @@ -58,8 +59,9 @@ require (
github.com/trinodb/trino-go-client v0.315.0
github.com/uber/athenadriver v1.1.15
github.com/vertica/vertica-sql-go v1.3.3
github.com/xo/chartfmt v0.0.0
github.com/xo/dburl v0.23.2
github.com/xo/echartsgoja v0.1.1
github.com/xo/resvg v0.6.0
github.com/xo/tblfmt v0.13.2
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e
github.com/ydb-platform/ydb-go-sdk/v3 v3.75.2
Expand Down Expand Up @@ -235,6 +237,7 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/kenshaw/snaker v0.2.0 // indirect
github.com/klauspost/asmfmt v1.3.2 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
Expand Down Expand Up @@ -296,9 +299,6 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xo/echartsgoja v0.1.1 // indirect
github.com/xo/resvg v0.6.0 // indirect
github.com/xo/vegagoja v0.1.0 // indirect
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240528144234-5d5a685e41f7 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
Expand Down Expand Up @@ -355,5 +355,3 @@ require (
modernc.org/token v1.1.0 // indirect
modernc.org/zappy v1.1.0 // indirect
)

replace github.com/xo/chartfmt => ../chartfmt
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,12 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kenshaw/colors v0.1.6 h1:saSe9+ubchrnwWqwfNIP5CLEQcGcFp3vgiag2g538jk=
github.com/kenshaw/colors v0.1.6/go.mod h1:+Nx5c4s70YO6elThBFOk0/9InGOvV1+uAak7T29sCKk=
github.com/kenshaw/rasterm v0.1.10 h1:cMCTpBHfqmftt/VqeT6B+9Td+mYi+ZtziN+XBdrTQfA=
github.com/kenshaw/rasterm v0.1.10/go.mod h1:kL4DCN+wOlQ4BPBCxA+itiVwiObRAj0Hkze7SbCyYaw=
github.com/kenshaw/snaker v0.2.0 h1:DPlxCtAv9mw1wSsvIN1khUAPJUIbFJUckMIDWSQ7TC8=
github.com/kenshaw/snaker v0.2.0/go.mod h1:DNyRUqHMZ18/zioxr6R7m4kSxxf2+QmB0BXoORsXRaY=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
Expand Down Expand Up @@ -1536,8 +1540,6 @@ github.com/xo/tblfmt v0.13.2 h1:GzHsRYduJxKqwNekczv2ZJwpznsSU89Dr2L+qVyW63Y=
github.com/xo/tblfmt v0.13.2/go.mod h1:BLPC+dRy68cgSK/mPgQRfFQ/xLg231Fyic178ybjB34=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
github.com/xo/vegagoja v0.1.0 h1:jnIeXVM6HTzWyt2HHmJMkhgK1zjZMIdhdI+MBFjkF54=
github.com/xo/vegagoja v0.1.0/go.mod h1:2DGNf2X4fnAw2h5zSVIdF1inbmEpoE+rSbzzYBYjTAY=
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 h1:zzrxE1FKn5ryBNl9eKOeqQ58Y/Qpo3Q9QNxKHX5uzzQ=
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240528144234-5d5a685e41f7 h1:nL8XwD6fSst7xFUirkaWJmE7kM0CdWRYgu6+YQer1d4=
Expand Down
1 change: 1 addition & 0 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ func (h *Handler) Open(ctx context.Context, params ...string) error {
// force error/check connection
if err == nil {
if err = drivers.Ping(ctx, h.u, h.db); err == nil {
h.l.Completer(drivers.NewCompleter(ctx, h.u, h.db, readerOpts(), completer.WithConnStrings(h.connStrings())))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a check for h.l.Interactive() before calling this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in c0940a3.

return h.Version(ctx)
}
}
Expand Down
Loading