feat(duckdb): add connection bootstrap and remote catalogs
This commit is contained in:
41 files changed
+893
-194
No files matched your search
@@ -1107,9 +1107,7 @@ pub async fn do_execute(
|
||||
let (_duckdb_attached_names, read_only_connection) = {
|
||||
let configs = state.configs.read().await;
|
||||
let config = crate::connection::config_for_pool_key(pool_key, &configs);
|
||||
let attached = config
|
||||
.map(|c| c.attached_databases.iter().map(|db| db.name.clone()).collect::<Vec<_>>())
|
||||
.unwrap_or_default();
|
||||
let attached = config.map(crate::db::duckdb_sql::config_attached_names).unwrap_or_default();
|
||||
let connection = config.filter(|config| config.read_only).map(|config| (config.name.clone(), config.db_type));
|
||||
(attached, connection)
|
||||
};
|
||||
@@ -3159,6 +3157,7 @@ mod tests {
|
||||
visible_databases: None,
|
||||
visible_schemas: None,
|
||||
attached_databases: Vec::new(),
|
||||
init_script: None,
|
||||
color: None,
|
||||
transport_layers: Vec::new(),
|
||||
connect_timeout_secs: 10,
|
||||
@@ -4029,6 +4028,7 @@ mod tests {
|
||||
visible_databases: None,
|
||||
visible_schemas: None,
|
||||
attached_databases: Vec::new(),
|
||||
init_script: None,
|
||||
color: None,
|
||||
transport_layers: Vec::new(),
|
||||
connect_timeout_secs: 5,
|
||||
|
||||
Reference in new issue
Block a user