pub struct Config { /* private fields */ }Expand description
duckdb configuration Refer to https://github.com/duckdb/duckdb/blob/master/src/main/config.cpp
Implementations§
Source§impl Config
impl Config
Sourcepub fn flag_count() -> usize
pub fn flag_count() -> usize
The number of configuration flags DuckDB recognises.
Flags are addressable by index in 0..flag_count() via Config::flag.
Sourcepub fn flag(index: usize) -> Option<ConfigFlag>
pub fn flag(index: usize) -> Option<ConfigFlag>
The name and description of the configuration flag at index, or None if
index >= flag_count().
Wraps duckdb_get_config_flag; the returned name/description are static
strings owned by DuckDB (never freed) and are copied into the ConfigFlag.
Sourcepub fn flags() -> impl Iterator<Item = ConfigFlag>
pub fn flags() -> impl Iterator<Item = ConfigFlag>
Iterates every configuration flag DuckDB recognises, in index order.
Sourcepub fn enable_autoload_extension(self, enabled: bool) -> Result<Config>
pub fn enable_autoload_extension(self, enabled: bool) -> Result<Config>
enable autoload extensions
Sourcepub fn access_mode(self, mode: AccessMode) -> Result<Config>
pub fn access_mode(self, mode: AccessMode) -> Result<Config>
Access mode of the database (AUTOMATIC, READ_ONLY, or READ_WRITE)
Sourcepub fn custom_user_agent(self, custom_user_agent: &str) -> Result<Config>
pub fn custom_user_agent(self, custom_user_agent: &str) -> Result<Config>
Metadata from DuckDB callers
Sourcepub fn default_order(self, order: DefaultOrder) -> Result<Config>
pub fn default_order(self, order: DefaultOrder) -> Result<Config>
The order type used when none is specified (ASC or DESC)
Sourcepub fn default_null_order(self, null_order: DefaultNullOrder) -> Result<Config>
pub fn default_null_order(self, null_order: DefaultNullOrder) -> Result<Config>
Null ordering used when none is specified (NULLS_FIRST or NULLS_LAST)
Sourcepub fn enable_external_access(self, enabled: bool) -> Result<Config>
pub fn enable_external_access(self, enabled: bool) -> Result<Config>
Allow the database to access external state (through e.g. COPY TO/FROM, CSV readers, pandas replacement scans, etc)
Sourcepub fn enable_object_cache(self, enabled: bool) -> Result<Config>
pub fn enable_object_cache(self, enabled: bool) -> Result<Config>
Whether or not object cache is used to cache e.g. Parquet metadata
Sourcepub fn allow_unsigned_extensions(self) -> Result<Config>
pub fn allow_unsigned_extensions(self) -> Result<Config>
Allow to load third-party duckdb extensions.
Sourcepub fn max_memory(self, memory: &str) -> Result<Config>
pub fn max_memory(self, memory: &str) -> Result<Config>
The maximum memory of the system (e.g. 1GB)