Driver Manager¶
This document describes the installation and usage of the Rust driver
manager which is available in the adbc_driver_manager
crate.
Installation¶
cargo add adbc_core adbc_driver_manager
Usage¶
use adbc_core::options::AdbcVersion;
use adbc_core::{Database, Driver};
use adbc_driver_manager::ManagedDriver;
// You must build/locate the driver yourself
let mut driver = ManagedDriver::load_dynamic_from_filename(
"/PATH/TO/libadbc_driver_sqlite.so",
None,
AdbcVersion::default(),
)
.expect("Failed to load driver");
let db = driver
.new_database()
.expect("Failed to create database handle");
let mut conn = db.new_connection().expect("Failed to create connection")
API Reference¶
See the API reference: Module driver_manager.