-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(remote databases): execute_query for snowflake (#7573)
* feat(remote databases): execute_query for snowflake * refactor * add comment * fix support nulls --------- Co-authored-by: Henry Fontanier <[email protected]>
- Loading branch information
1 parent
6fc623e
commit e81a040
Showing
11 changed files
with
377 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
use anyhow::Result; | ||
|
||
use async_trait::async_trait; | ||
|
||
use crate::databases::{ | ||
database::{QueryDatabaseError, QueryResult}, | ||
table_schema::TableSchema, | ||
}; | ||
|
||
#[async_trait] | ||
pub trait RemoteDatabase { | ||
async fn get_tables_used_by_query(&self, query: &str) -> Result<Vec<String>>; | ||
async fn execute_query( | ||
&self, | ||
query: &str, | ||
) -> Result<(Vec<QueryResult>, TableSchema), QueryDatabaseError>; | ||
} |
Oops, something went wrong.