pub async fn query(
        &self,
        table: &str,
        filter: &Value,
        fields: &str,
        order_by: Option<Vec<OrderBy>>,
        limit: Option<u32>,
        timeout: Option<u32>,
    ) -> ClientResult<Value> {
        let query = Self::generate_query_var(table, filter, fields, order_by, limit, timeout);

        self.ensure_client().await?;
        let client_lock = self.server_info.read().await;
        let address = &client_lock.as_ref().unwrap().query_url;

        let result = self.query_vars(address, query, timeout).await?;

        // try to extract the record value from the answer
        let records_array = &result["data"][&table];
        if records_array.is_null() {
            Err(Error::invalid_server_response(format!(
                "Invalid query answer: {}",
                result
            )))
        } else {
            Ok(records_array.clone())
        }
    }
// Returns Stream with GraphQL query answer
Returns Stream with GraphQL query answer
Returns Stream with GraphQL query answer
pub async fn query(
        &self,
        table: &str,
        filter: &Value,
        fields: &str,
        order_by: Option<Vec<OrderBy>>,
        limit: Option<u32>,
        timeout: Option<u32>,
    ) -> ClientResult<Value> {
        let query = Self::generate_query_var(table, filter, fields, order_by, limit, timeout);
        self.ensure_client().await?;
        let client_lock = self.server_info.read().await;
        let address = &client_lock.as_ref().unwrap().query_url;
        let result = self.query_vars(address, query, timeout).await?;
        // try to extract the record value from the answer
        let records_array = &result["data"][&table];
        if records_array.is_null() {
            Err(Error::invalid_server_response(format!(
                "Invalid query answer: {}",
                result
            )))
        } else {
            Ok(records_array.clone())
        }
    }
pub async fn query ( & self , table : & str , filter : & Value , fields : & str , order_by : Option < Vec < OrderBy > > , limit : Option < u32 > , timeout : Option < u32 > , ) -> ClientResult < Value > { let query = Self :: generate_query_var ( table , filter , fields , order_by , limit , timeout ) ; self . ensure_client ( ) . await ? ; let client_lock = self . server_info . read ( ) . await ; let address = & client_lock . as_ref ( ) . unwrap ( ) . query_url ; let result = self . query_vars ( address , query , timeout ) . await ? ; // try to extract the record value from the answer let records_array = & result [ " " ] [ & table ] ; if records_array . is_null ( ) { Err ( Error :: invalid_server_response ( format ! ( " " result ) ) ) } else { Ok ( records_array . clone ( ) ) } }
Returns Stream with GraphQL query answer
Returns Stream with GraphQL query answer
&self
table
&str
filter
&Value
fields
&str
order_by
Option<Vec<OrderBy>>
limit
Option<u32>
timeout
Option<u32>