This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 7237ddf29 docs(rust/core): add simple usage of Driver Manager (#3086)
7237ddf29 is described below

commit 7237ddf29d260759600170f2a8a0abd27375ef43
Author: Daijiro Fukuda <[email protected]>
AuthorDate: Thu Jul 3 08:55:42 2025 +0900

    docs(rust/core): add simple usage of Driver Manager (#3086)
    
    Closes #3025
---
 docs/source/rust/driver_manager.rst | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/docs/source/rust/driver_manager.rst 
b/docs/source/rust/driver_manager.rst
index b4f810c1f..7e0317c0d 100644
--- a/docs/source/rust/driver_manager.rst
+++ b/docs/source/rust/driver_manager.rst
@@ -24,3 +24,33 @@ dynamically-loaded drivers.  This allows applications to 
load drivers at
 runtime, and use drivers that aren't necessarily written in Rust.  It is
 currently part of the adbc_core package, though we plan to split it into its
 own package for users who don't want or need FFI.
+
+Installation
+============
+
+.. code-block:: shell
+
+   cargo add adbc_core --features driver_manager
+
+Usage
+=====
+
+.. code-block:: rust
+
+    use adbc_core::{Connection, Database, Driver, Statement};
+    use adbc_core::options::{AdbcVersion, OptionDatabase};
+    use adbc_core::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 
<https://docs.rs/adbc_core/latest/adbc_core/driver_manager/>`_.

Reply via email to