-
Notifications
You must be signed in to change notification settings - Fork 2
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
Future of this crate and ADBC #28
Comments
This crate gives the application direct support for interacting with databases without having to manage separately installed drivers. Will this still be supported? |
What do you mean here? With how I see now, rust applications would add dependency to:
|
From https://arrow.apache.org/docs/format/ADBC.html#example-use-cases
My interpretation of the above text is that ADBC functions similar to ODBC where you are required to have ODBC drivers installed on your system for each database that you want to interact with (at least if you want to interact with multiple different database types). Currently this crates does not require any external driver to be present and the application can interact with multiple different database types without the end user having to manage external ADBC drivers. |
Oh, yes - I believe that quote talks about applications using the C ADBC API, which does not allow specifying multiple drivers in application code, so they use the driver_manager as the workaround. All of that would not be necessary when using Rust ADBC API, which is defining traits that can be implemented and imported multiple times in your code. |
Then my question is resolved 🙂 Thanks for the quick replies 👍 |
ADBC has recently updated their Rust API. It is quite similar to the ADBC C API, so it is would be possible to export a Rust ADBC driver as a C library to be used from any language using FFI.
The downside is that it is "low-level" and easy to misuse (i.e. by not setting SQL queries on a statement, by passing-in incorrectly formatted options, by not closing a statement but instead just dropping it). Such misuse would lead to run-time errors or undefined behavior.
This API is therefore "unsafe" and not suitable for general use in rust ecosystem. Instead, I suggest we create a high-level wrapper API that would be very hard or impossible to misuse but would use the "unsafe" API internally.
This way, it would also be possible to use non-Rust ADBC drivers from Rust via FFI.
Now, regarding this crate, I plan to:
connector_arrow::api
as a base to define the high-level ADBC API,(writing this, I realize we need a good name for the high-level ADBC API)
The text was updated successfully, but these errors were encountered: