Trait QueryService

Source
pub trait QueryService: Service {
    // Required methods
    fn execute_dataset_query<'life0, 'async_trait>(
        &'life0 self,
        query: DatasetQuery,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_native_query<'life0, 'async_trait>(
        &'life0 self,
        database_id: i32,
        query: NativeQuery,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<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 = ServiceResult<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 = ServiceResult<QueryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_sql_with_params<'life0, 'life1, 'async_trait>(
        &'life0 self,
        database_id: i32,
        sql: &'life1 str,
        params: HashMap<String, Value>,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn execute_sql<'life0, 'life1, 'async_trait>(
        &'life0 self,
        database_id: i32,
        sql: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn export_query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        format: &'life1 str,
        query: Value,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate_query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        sql: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate_dataset_query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 DatasetQuery,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Service trait for Query operations

Required Methods§

Source

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

Execute a dataset query

Source

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

Execute a native SQL query

Source

fn execute_raw_query<'life0, 'async_trait>( &'life0 self, query: Value, ) -> Pin<Box<dyn Future<Output = ServiceResult<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 = ServiceResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a pivot query

Source

fn execute_sql_with_params<'life0, 'life1, 'async_trait>( &'life0 self, database_id: i32, sql: &'life1 str, params: HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a SQL query with parameters

Source

fn execute_sql<'life0, 'life1, 'async_trait>( &'life0 self, database_id: i32, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a simple SQL query

Source

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

Export query results

Source

fn validate_query<'life0, 'life1, 'async_trait>( &'life0 self, sql: &'life1 str, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate SQL query syntax (basic validation)

Source

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

Validate a dataset query

Implementors§