[query/datasources] reorder datasource order
@@ -132,6 +132,14 @@ impl IDataSource for DataSource {
Ok(database.clone())
}
+ fn get_databases(&self) -> Result<Vec<String>> {
+ let mut results = vec![];
+ for (k, _v) in self.databases.read().iter() {
+ results.push(k.clone());
+ }
+ Ok(results)
+ }
+
fn get_table(&self, db_name: &str, table_name: &str) -> Result<Arc<dyn ITable>> {
let db_lock = self.databases.read();
let database = db_lock.get(db_name).ok_or_else(|| {
@@ -145,14 +153,6 @@ impl IDataSource for DataSource {
Ok(table.clone())
}
- fn get_databases(&self) -> Result<Vec<String>> {
- let mut results = vec![];
- for (k, _v) in self.databases.read().iter() {
- results.push(k.clone());
- }
- Ok(results)
- }
-
fn get_all_tables(&self) -> Result<Vec<(String, Arc<dyn ITable>)>> {
let mut results = vec![];
for (k, v) in self.databases.read().iter() {
