Expand description
ADBC: Arrow Database Connectivity
ADBC is a set of APIs and libraries for Arrow-native access to databases. Execute SQL and Substrait queries, query database catalogs, and more, all using Arrow data to eliminate unnecessary data copies, speed up access, and make it more convenient to build analytical applications.
Read more about ADBC at https://arrow.apache.org/adbc/
This library currently provides:
- An abstract Rust API to be implemented by vendor-specific drivers.
- A driver manager which implements this same API, but dynamically loads drivers internally and forwards calls appropriately using the C API.
- A driver exporter that takes an implementation of the abstract API and turns it into an object file that implements the C API.
§Native Rust drivers
Native Rust drivers will implement the abstract API consisting of the traits:
For drivers implemented in Rust, using these will be more efficient and safe, since it avoids the overhead of going through C FFI.
§Driver Manager
The [driver_manager] module allows loading drivers exposing the C API,
either from an initialization function (link-time, either static or dynamic)
or by dynamically finding such a function in a dynamic library (run-time).
The driver manager is gated behind the driver_manager
feature flag.
§Driver Exporter
The driver exporter allows exposing native Rust drivers as C drivers to be used by other langages via their own driver manager. Once you have an implementation of Driver, provided that it also implements Default, you can build it as an object file implementing the C API with the export_driver macro.
Modules§
- error
- Error, status and result types.
- ffi
- C-compatible items as defined in
adbc.h
- options
- Various option and configuration types.
- schemas
- Schemas and data types that appear through ADBC.
Macros§
- export_
driver - Export a Rust driver as a C driver.
Structs§
- Partitioned
Result - A partitioned result set as returned by Statement::execute_partitions.
Traits§
- Connection
- A handle to an ADBC connection.
- Database
- A handle to an ADBC database.
- Driver
- A handle to an ADBC driver.
- Optionable
- Ability to configure an object by setting/getting options.
- Statement
- A handle to an ADBC statement.
Type Aliases§
- Partitions
- Each data partition is described by an opaque byte array and can be retrieved with Connection::read_partition.