Expand description
RAII wrapper for DuckDB database configuration.
DbConfig wraps duckdb_config and provides a builder-style API for
setting configuration options before opening a DuckDB database.
Extension authors typically receive an already-opened connection and do not
need to open databases themselves. DbConfig is useful when an extension
needs to open a secondary DuckDB database from within its callbacks —
for example, a virtual table that reads from another .duckdb file.
§Example
use quack_rs::config::DbConfig;
// fn open_secondary() -> Result<(), quack_rs::error::ExtensionError> {
// let config = DbConfig::new()?
// .set("access_mode", "READ_ONLY")?
// .set("threads", "4")?;
// // Pass config.as_raw() to duckdb_open_ext(...)
// Ok(())
// }§Available configuration flags
Use DbConfig::flag_count and DbConfig::get_flag to enumerate all
supported option names and their descriptions at runtime.
Structs§
- DbConfig
- RAII wrapper for a
duckdb_confighandle.