amoeba opened a new pull request, #4402:
URL: https://github.com/apache/arrow-adbc/pull/4402
The current way to load an ADBC driver installed via ADBC driver manifest is
cumbersome because the user has to do it over multiple calls and can't use the
block-based `Database.open` if they need to customize init. This is currently
what it looks like to load the sqlite driver installed via manfiest:
```ruby
database = ADBC::Database.new
begin
database.set_option("driver", "sqlite")
database.set_option("uri", "games.sqlite")
database.set_load_flags(ADBC::LoadFlags::DEFAULT)
...
```
It would be better if we could write:
```ruby
ADBC::Database.open(driver: "sqlite", uri: "games.sqlite") do |database|
...
end
```
This PR does two things,
1. Set the default value of LoadFlags to ADBC_LOAD_FLAG_DEFAULT. This
matches Python.
2. Adds a load_flags keyword arg to Database.open so the user can override
it without having to drop down to Database.new
This is a breaking change because existing direct and indirect callers of
Database.new will get different driver loading behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]