[−][src]Struct discord_cassandra_cpp::Session
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]
pub async fn prepare(&self, query: impl AsRef<str>) -> Result<PreparedStatement>
[src]
Create a prepared statement with the given query.
pub fn statement(&self, query: impl AsRef<str>) -> Statement
[src]
Creates a statement with the given query.
pub async fn execute(&self, query: impl AsRef<str>) -> Result<CassResult>
[src]
Executes a given query.
pub fn batch(&self, batch_type: BatchType) -> Batch
[src]
Creates a new batch that is bound to this session.
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]
Gets a copy of this session's performance/diagnostic metrics.
Trait Implementations
impl Clone for Session
[src]
impl Debug for Session
[src]
impl Default for Session
[src]
impl Eq for Session
[src]
impl PartialEq<Session> for Session
[src]
impl Send for Session
[src]
impl StructuralEq for Session
[src]
impl StructuralPartialEq for Session
[src]
impl Sync for Session
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,