pub async fn try_run_query(
    sql: impl Into<String>,
    namespace: impl Into<String>,
    querier_connection: Connection,
) -> Result<Vec<RecordBatch>, influxdb_iox_client::flight::Error> {
    let namespace = namespace.into();
    let sql = sql.into();

    let mut client = influxdb_iox_client::flight::Client::new(querier_connection);

    // This does nothing except test the client handshake implementation.
    client.handshake().await?;

    let mut response = client
        .perform_query(ReadInfo {
            namespace_name: namespace,
            sql_query: sql,
        })
        .await?;

    response.collect().await
}
/// Runs a query using the flight API on the specified connection.
///
/// This is similar ot [`run_query`] but does NOT unwrap the result.
Runs a query using the flight API on the specified connection.
This is similar ot [`run_query`] but does NOT unwrap the result.
Runs a query using the flight API on the specified connection . This is similar ot [ ` run_query ` ] but does NOT unwrap the result .
pub async fn try_run_query(
    sql: impl Into<String>,
    namespace: impl Into<String>,
    querier_connection: Connection,
) -> Result<Vec<RecordBatch>, influxdb_iox_client::flight::Error> {
    let namespace = namespace.into();
    let sql = sql.into();
    let mut client = influxdb_iox_client::flight::Client::new(querier_connection);
    // This does nothing except test the client handshake implementation.
    client.handshake().await?;
    let mut response = client
        .perform_query(ReadInfo {
            namespace_name: namespace,
            sql_query: sql,
        })
        .await?;
    response.collect().await
}
pub async fn try_run_query ( sql : impl Into < String > , namespace : impl Into < String > , querier_connection : Connection , ) -> Result < Vec < RecordBatch > , influxdb_iox_client :: flight :: Error > { let namespace = namespace . into ( ) ; let sql = sql . into ( ) ; let mut client = influxdb_iox_client :: flight :: Client :: new ( querier_connection ) ; // This does nothing except test the client handshake implementation. client . handshake ( ) . await ? ; let mut response = client . perform_query ( ReadInfo { namespace_name : namespace , sql_query : sql , } ) . await ? ; response . collect ( ) . await }
Runs a query using the flight API on the specified connection.
Runs a query using the flight API on the specified connection .
sql
impl Into<String>
namespace
impl Into<String>
querier_connection
Connection
sql
impl Into<String>
namespace
impl Into<String>
querier_connection
Connection