We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Looks like the Go usage for the Flight SQL Driver is a bit out of date: https://arrow.apache.org/adbc/current/driver/flight_sql.html
import ( "context" "github.com/apache/arrow-adbc/go/adbc" "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" ) var headers = map[string]string{"foo": "bar"} func main() { options := map[string]string{ adbc.OptionKeyURI: "grpc+tls://localhost:8080", flightsql.OptionSSLSkipVerify: adbc.OptionValueEnabled, } for k, v := range headers { options[flightsql.OptionRPCCallHeaderPrefix + k] = v } var drv flightsql.Driver db, err := drv.NewDatabase(options) if err != nil { // do something with the error } defer db.Close() cnxn, err := db.Open(context.Background()) if err != nil { // handle the error } defer cnxn.Close() }
Specifically var drv flightsql.Driver doesn't work in the latest version. Looks like this was last viable as of v0.7.0 https://pkg.go.dev/github.com/apache/arrow-adbc/go/adbc@v0.7.0/driver/flightsql
var drv flightsql.Driver
Regardless using the NewDriver method works as intended:
NewDriver
import ( "context" "github.com/apache/arrow-adbc/go/adbc" "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" ) var headers = map[string]string{"foo": "bar"} func main() { options := map[string]string{ adbc.OptionKeyURI: "grpc+tls://localhost:8080", flightsql.OptionSSLSkipVerify: adbc.OptionValueEnabled, } for k, v := range headers { options[flightsql.OptionRPCCallHeaderPrefix + k] = v } var alloc memory.Allocator drv := flightsql.NewDriver(alloc) db, err := drv.NewDatabase(options) if err != nil { // do something with the error } defer db.Close() cnxn, err := db.Open(context.Background()) if err != nil { // handle the error } defer cnxn.Close() }
The text was updated successfully, but these errors were encountered:
Ah, I should try to turn this into an executable example so that it gets properly built and tested in CI
Sorry, something went wrong.
docs: change Flight SQL driver usage to executable example
a14ae77
Fixes apache#2354.
5234f70
b6622c7
lidavidm
Successfully merging a pull request may close this issue.
What feature or improvement would you like to see?
Looks like the Go usage for the Flight SQL Driver is a bit out of date:
https://arrow.apache.org/adbc/current/driver/flight_sql.html
Specifically
var drv flightsql.Driver
doesn't work in the latest version. Looks like this was last viable as of v0.7.0https://pkg.go.dev/github.com/apache/arrow-adbc/go/adbc@v0.7.0/driver/flightsql
Regardless using the
NewDriver
method works as intended:The text was updated successfully, but these errors were encountered: