Trait QueryRepository

Source
pub trait QueryRepository: Send + Sync {
Show 15 methods // Required methods fn execute_dataset_query<'life0, 'async_trait>( &'life0 self, query: DatasetQuery, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn execute_raw_query<'life0, 'async_trait>( &'life0 self, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn execute_pivot_query<'life0, 'async_trait>( &'life0 self, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn export_query<'life0, 'life1, 'async_trait>( &'life0 self, format: &'life1 str, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<u8>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn execute_native<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, sql: &'life1 str, parameters: Option<HashMap<String, Value>>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn execute_native_query<'life0, 'async_trait>( &'life0 self, database_id: i32, query: NativeQuery, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn execute_mbql<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, mbql: &'life1 Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn save_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Query, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_query<'life0, 'async_trait>( &'life0 self, id: i32, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn list_queries<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationParams>, filters: Option<QueryFilterParams>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Query>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn update_query<'life0, 'life1, 'async_trait>( &'life0 self, id: i32, query: &'life1 Query, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_query<'life0, 'async_trait>( &'life0 self, id: i32, ) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_metadata<'life0, 'async_trait>( &'life0 self, database_id: DatabaseId, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Value>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn validate_query<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, query_type: QueryType, query: &'life1 Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_execution_history<'life0, 'async_trait>( &'life0 self, query_id: Option<i32>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Value>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Repository trait for Query operations

Required Methods§

Source

fn execute_dataset_query<'life0, 'async_trait>( &'life0 self, query: DatasetQuery, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a dataset query

Source

fn execute_raw_query<'life0, 'async_trait>( &'life0 self, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a raw query (JSON format)

Source

fn execute_pivot_query<'life0, 'async_trait>( &'life0 self, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a pivot query

Source

fn export_query<'life0, 'life1, 'async_trait>( &'life0 self, format: &'life1 str, query: Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export query results

Source

fn execute_native<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, sql: &'life1 str, parameters: Option<HashMap<String, Value>>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a native SQL query

Source

fn execute_native_query<'life0, 'async_trait>( &'life0 self, database_id: i32, query: NativeQuery, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a native query object

Source

fn execute_mbql<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, mbql: &'life1 Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute an MBQL query

Source

fn save_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 Query, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Save a query

Source

fn get_query<'life0, 'async_trait>( &'life0 self, id: i32, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a saved query

Source

fn list_queries<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationParams>, filters: Option<QueryFilterParams>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Query>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List saved queries

Source

fn update_query<'life0, 'life1, 'async_trait>( &'life0 self, id: i32, query: &'life1 Query, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Query>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update a saved query

Source

fn delete_query<'life0, 'async_trait>( &'life0 self, id: i32, ) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a saved query

Source

fn get_metadata<'life0, 'async_trait>( &'life0 self, database_id: DatabaseId, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get query metadata (schema, tables, columns)

Source

fn validate_query<'life0, 'life1, 'async_trait>( &'life0 self, database_id: DatabaseId, query_type: QueryType, query: &'life1 Value, ) -> Pin<Box<dyn Future<Output = RepositoryResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate a query without executing

Source

fn get_execution_history<'life0, 'async_trait>( &'life0 self, query_id: Option<i32>, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get query execution history

Implementors§