pub struct ConnectionOptions {
pub attach_remotes: bool,
pub attach_project: bool,
pub create_ephemeral_views: bool,
pub run_migration: bool,
}Expand description
Options for creating a database connection.
Controls what gets loaded and attached when opening a connection. Use this for explicit control over connection behavior.
§Connection Stages
- Extensions (always): parquet, icu, scalarfs, duck_hunt
- Blob resolution (always): S3 credentials, blob_roots macro
- Migration (optional): Upgrade existing installations to new schema
- Remotes (optional): Attach remote databases, rebuild remotes.* views
- Project (optional): Attach project-local database if in a project
- CWD views (optional): Rebuild cwd.* views for current directory
Fields§
§attach_remotes: boolAttach configured remotes (default: true). When true, remote databases are attached and remotes.* views are rebuilt to include the attached data.
attach_project: boolAttach project database if in a project directory (default: true).
create_ephemeral_views: boolRebuild cwd.* views for current working directory (default: true). These views filter main.* data to entries matching the current directory.
run_migration: boolRun migration for existing installations (default: false). Only enable this for explicit upgrade operations.
Implementations§
Source§impl ConnectionOptions
impl ConnectionOptions
Sourcepub fn minimal() -> Self
pub fn minimal() -> Self
Create options for a minimal connection (no attachments). Useful for write operations that don’t need remote data.
Sourcepub fn for_migration() -> Self
pub fn for_migration() -> Self
Create options for a migration/upgrade connection.
Trait Implementations§
Source§impl Clone for ConnectionOptions
impl Clone for ConnectionOptions
Source§fn clone(&self) -> ConnectionOptions
fn clone(&self) -> ConnectionOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more