Struct cassandra_cpp::Session [−][src]
Expand description
A session object is used to execute queries and maintains cluster state through the control connection. The control connection is used to auto-discover nodes and monitor cluster changes (topology and schema). Each session also maintains multiple /pools of connections to cluster nodes which are used to query the cluster.
Instances of the session object are thread-safe to execute queries.
Implementations
impl Session
[src]
impl Session
[src]pub fn new() -> Session
[src]
pub fn new() -> Session
[src]Create a new Cassanda session. It’s recommended to use Cluster.connect() instead
pub fn connect(self, cluster: &Cluster) -> CassFuture<()>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn connect(self, cluster: &Cluster) -> CassFuture<()>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Connects a session.
pub fn connect_keyspace(
&self,
cluster: &Cluster,
keyspace: &str
) -> Result<CassFuture<()>>
[src]
pub fn connect_keyspace(
&self,
cluster: &Cluster,
keyspace: &str
) -> Result<CassFuture<()>>
[src]Connects a session and sets the keyspace.
pub fn close(self) -> CassFuture<()>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn close(self) -> CassFuture<()>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Closes the session instance, outputs a close future which can be used to determine when the session has been terminated. This allows in-flight requests to finish.
pub fn prepare(&self, query: &str) -> Result<CassFuture<PreparedStatement>>
[src]
pub fn prepare(&self, query: &str) -> Result<CassFuture<PreparedStatement>>
[src]Create a prepared statement.
pub fn execute_batch(&self, batch: &Batch) -> CassFuture<CassResult>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn execute_batch(&self, batch: &Batch) -> CassFuture<CassResult>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Execute a batch statement.
pub fn execute_batch_with_payloads(
&self,
batch: &Batch
) -> CassFuture<(CassResult, HashMap<String, Vec<u8>>)>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn execute_batch_with_payloads(
&self,
batch: &Batch
) -> CassFuture<(CassResult, HashMap<String, Vec<u8>>)>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Execute a batch statement and get any custom payloads from the response.
pub fn execute(&self, statement: &Statement) -> CassFuture<CassResult>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn execute(&self, statement: &Statement) -> CassFuture<CassResult>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Execute a statement.
pub fn execute_with_payloads(
&self,
statement: &Statement
) -> CassFuture<(CassResult, HashMap<String, Vec<u8>>)>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]
pub fn execute_with_payloads(
&self,
statement: &Statement
) -> CassFuture<(CassResult, HashMap<String, Vec<u8>>)>ⓘNotable traits for CassFuture<T>
impl<T: Completable> Future for CassFuture<T> type Output = Result<T>;
[src]Execute a statement and get any custom payloads from the response.
pub fn get_schema_meta(&self) -> SchemaMeta
[src]
pub fn get_schema_meta(&self) -> SchemaMeta
[src]Gets a snapshot of this session’s schema metadata. The returned snapshot of the schema metadata is not updated. This function must be called again to retrieve any schema changes since the previous call.
pub fn get_metrics(&self) -> SessionMetrics
[src]
pub fn get_metrics(&self) -> SessionMetrics
[src]Gets a copy of this session’s performance/diagnostic metrics.
Trait Implementations
impl Send for Session
[src]
impl Sync for Session
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,