Skip to content

Commit

Permalink
Avoid custom version check and disable multi-line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan authored and kenshaw committed Apr 13, 2023
1 parent 5e07f38 commit 8f5e6b7
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions drivers/flightsql/flightsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,10 @@
package flightsql

import (
"context"

_ "github.com/apache/arrow/go/v12/arrow/flight/flightsql/driver" // DRIVER
"github.com/xo/usql/drivers"
)

func init() {
drivers.Register("flightsql", drivers.Driver{
AllowMultilineComments: true,
Version: func(ctx context.Context, db drivers.DB) (string, error) {
var ver string
err := db.QueryRowContext(
ctx,
`SELECT version()`,
).Scan(&ver)
if err != nil {
return "", err
}
return "FlightSQL " + ver, nil
},
})
drivers.Register("flightsql", drivers.Driver{})
}

0 comments on commit 8f5e6b7

Please sign in to comment.