Trait QueryExecutor

Source
pub trait QueryExecutor: Send {
    // Required method
    fn query_with_params_tw<'life0, 'async_trait, Q>(
        self: Pin<&'life0 mut Self>,
        query: Q,
        query_params: QueryParams,
        with_tracing: bool,
        with_warnings: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn query<'life0, 'async_trait, Q>(
        self: Pin<&'life0 mut Self>,
        query: Q,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn query_tw<'life0, 'async_trait, Q>(
        self: Pin<&'life0 mut Self>,
        query: Q,
        with_tracing: bool,
        with_warnings: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn query_with_values<'life0, 'async_trait, Q, V>(
        self: Pin<&'life0 mut Self>,
        query: Q,
        values: V,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             V: 'async_trait + Into<QueryValues> + Send,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn query_with_values_tw<'life0, 'async_trait, Q, V>(
        self: Pin<&'life0 mut Self>,
        query: Q,
        values: V,
        with_tracing: bool,
        with_warnings: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             V: 'async_trait + Into<QueryValues> + Send,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn query_with_params<'life0, 'async_trait, Q>(
        self: Pin<&'life0 mut Self>,
        query: Q,
        query_params: QueryParams,
    ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
       where Q: 'async_trait + ToString + Send,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Traits that provides methods for immediate query execution.

Required Methods§

Source

fn query_with_params_tw<'life0, 'async_trait, Q>( self: Pin<&'life0 mut Self>, query: Q, query_params: QueryParams, with_tracing: bool, with_warnings: bool, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn query<'life0, 'async_trait, Q>( self: Pin<&'life0 mut Self>, query: Q, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, Self: 'async_trait, 'life0: 'async_trait,

Executes a query with default parameters:

  • TDB
Examples found in repository?
examples/basic.rs (line 30)
18fn main() {
19  task::block_on(async {
20    let authenticator_strategy = NoneAuthenticator {};
21    let mut session = Session::connect(
22      "127.0.0.1:9042",
23      Compression::None,
24      authenticator_strategy.into(),
25    )
26    .await
27    .expect("session connect");
28    let pinned_session = Pin::new(&mut session);
29
30    let r = pinned_session.query(CREATE_KS_QUERY).await;
31    println!("Result {:?}", r);
32  });
33}
Source

fn query_tw<'life0, 'async_trait, Q>( self: Pin<&'life0 mut Self>, query: Q, with_tracing: bool, with_warnings: bool, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, Self: 'async_trait, 'life0: 'async_trait,

Executes a query with ability to trace it and see warnings, and default parameters:

  • TBD
Source

fn query_with_values<'life0, 'async_trait, Q, V>( self: Pin<&'life0 mut Self>, query: Q, values: V, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, V: 'async_trait + Into<QueryValues> + Send, Self: 'async_trait, 'life0: 'async_trait,

Executes a query with bounded values (either with or without names).

Source

fn query_with_values_tw<'life0, 'async_trait, Q, V>( self: Pin<&'life0 mut Self>, query: Q, values: V, with_tracing: bool, with_warnings: bool, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, V: 'async_trait + Into<QueryValues> + Send, Self: 'async_trait, 'life0: 'async_trait,

Executes a query with bounded values (either with or without names) and ability to see warnings, trace a request and default parameters.

Source

fn query_with_params<'life0, 'async_trait, Q>( self: Pin<&'life0 mut Self>, query: Q, query_params: QueryParams, ) -> Pin<Box<dyn Future<Output = Result<Frame>> + Send + 'async_trait>>
where Q: 'async_trait + ToString + Send, Self: 'async_trait, 'life0: 'async_trait,

Executes a query with query params without warnings and tracing.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§