pub struct Session<LB> {
pub compression: Compression,
/* private fields */
}
Expand description
CDRS session that holds one pool of authorized connecitons per node.
compression
field contains data compressor that will be used
for decompressing data received from Cassandra server.
Fields§
§compression: Compression
Implementations§
source§impl<'a, LB: Sized> Session<LB>
impl<'a, LB: Sized> Session<LB>
sourcepub fn paged<T: CDRSTransport + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error>>(
&'a self,
page_size: i32
) -> SessionPager<'a, M, Session<LB>, T>where
Session<LB>: CDRSSession<'static, T, M>,
pub fn paged<T: CDRSTransport + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error>>(
&'a self,
page_size: i32
) -> SessionPager<'a, M, Session<LB>, T>where
Session<LB>: CDRSSession<'static, T, M>,
Basing on current session returns new SessionPager
that can be used
for performing paged queries.
source§impl<'a, L> Session<L>
impl<'a, L> Session<L>
sourcepub fn listen<A: Authenticator + 'static + Sized>(
&self,
node: &str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<RefCell<TransportTcp>>, EventStream)>
pub fn listen<A: Authenticator + 'static + Sized>(
&self,
node: &str,
authenticator: A,
events: Vec<SimpleServerEvent>
) -> Result<(Listener<RefCell<TransportTcp>>, EventStream)>
Returns new event listener.
Trait Implementations§
source§impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> BatchExecutor<T, M> for Session<LB>
impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> BatchExecutor<T, M> for Session<LB>
fn batch_with_params_tw(
&self,
batch: QueryBatch,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn batch_with_params(&self, batch: QueryBatch) -> Result<Frame>
source§impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> ExecExecutor<T, M> for Session<LB>
impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> ExecExecutor<T, M> for Session<LB>
fn exec_with_params_tw(
&self,
prepared: &CBytesShort,
query_parameters: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn exec_with_params(
&self,
prepared: &CBytesShort,
query_parameters: QueryParams
) -> Result<Frame>
fn exec_with_values_tw<V: Into<QueryValues>>(
&self,
prepared: &CBytesShort,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn exec_with_values<V: Into<QueryValues>>(
&self,
prepared: &CBytesShort,
values: V
) -> Result<Frame>
fn exec_tw(
&self,
prepared: &CBytesShort,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn exec(&mut self, prepared: &CBytesShort) -> Result<Frame>
source§impl<'a, LB> GetCompressor<'a> for Session<LB>
impl<'a, LB> GetCompressor<'a> for Session<LB>
source§fn get_compressor(&self) -> Compression
fn get_compressor(&self) -> Compression
Returns compression that current session has.
source§impl<T: CDRSTransport + Send + Sync + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<Pool<M>>> GetConnection<T, M> for Session<LB>
impl<T: CDRSTransport + Send + Sync + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<Pool<M>>> GetConnection<T, M> for Session<LB>
source§fn get_connection(&self) -> Option<PooledConnection<M>>
fn get_connection(&self) -> Option<PooledConnection<M>>
Returns connection from a load balancer.
source§impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> PrepareExecutor<T, M> for Session<LB>
impl<'a, T: CDRSTransport + 'static, LB: LoadBalancingStrategy<Pool<M>> + Sized, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized> PrepareExecutor<T, M> for Session<LB>
source§fn prepare_tw<Q: ToString>(
&self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Result<PreparedQuery>
fn prepare_tw<Q: ToString>(
&self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Result<PreparedQuery>
It prepares a query for execution, along with query itself
the method takes
with_tracing
and with_warnings
flags
to get tracing information and warnings. Read moresource§impl<'a, T: CDRSTransport + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<Pool<M>> + Sized> QueryExecutor<T, M> for Session<LB>
impl<'a, T: CDRSTransport + 'static, M: ManageConnection<Connection = RefCell<T>, Error = Error> + Sized, LB: LoadBalancingStrategy<Pool<M>> + Sized> QueryExecutor<T, M> for Session<LB>
fn query_with_params_tw<Q: ToString>(
&self,
query: Q,
query_params: QueryParams,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
source§fn query<Q: ToString>(&self, query: Q) -> Result<Frame>
fn query<Q: ToString>(&self, query: Q) -> Result<Frame>
Executes a query with default parameters: Read more
source§fn query_tw<Q: ToString>(
&self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn query_tw<Q: ToString>(
&self,
query: Q,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
Executes a query with ability to trace it and see warnings, and default parameters: Read more
source§fn query_with_values<Q: ToString, V: Into<QueryValues>>(
&self,
query: Q,
values: V
) -> Result<Frame>
fn query_with_values<Q: ToString, V: Into<QueryValues>>(
&self,
query: Q,
values: V
) -> Result<Frame>
Executes a query with bounded values (either with or without names).
source§fn query_with_values_tw<Q: ToString, V: Into<QueryValues>>(
&self,
query: Q,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
fn query_with_values_tw<Q: ToString, V: Into<QueryValues>>(
&self,
query: Q,
values: V,
with_tracing: bool,
with_warnings: bool
) -> Result<Frame>
Executes a query with bounded values (either with or without names)
and ability to see warnings, trace a request and default parameters. Read more
source§fn query_with_params<Q: ToString>(
&self,
query: Q,
query_params: QueryParams
) -> Result<Frame>
fn query_with_params<Q: ToString>(
&self,
query: Q,
query_params: QueryParams
) -> Result<Frame>
Executes a query with query params without warnings and tracing.