mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 07:24:19 +01:00
Update core/lib.rs
Co-authored-by: bit-aloo <84662239+Shourya742@users.noreply.github.com>
This commit is contained in:
committed by
Lucas Forato
parent
804df8dd7a
commit
4161f68774
17
core/lib.rs
17
core/lib.rs
@@ -1843,15 +1843,16 @@ impl Connection {
|
||||
let mut mods = std::collections::HashSet::new();
|
||||
|
||||
let schema = self._db.schema.lock().unwrap();
|
||||
for table in schema.tables.values() {
|
||||
if let Table::Virtual(vtab) = table.as_ref() {
|
||||
if let Some(module_name) = vtab.module_name() {
|
||||
mods.insert(module_name.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mods
|
||||
schema.tables.values()
|
||||
.filter_map(|table| {
|
||||
if let Table::Virtual(vtab) = table.as_ref() {
|
||||
vtab.module_name().map(|name| name.to_string())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn get_query_only(&self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user