pub struct Query {
    pub contents: String,
    /* private fields */
}
Expand description

CQL query statement.

This represents a CQL query that can be executed on a server.

Fields

contents: String

Implementations

Creates a new Query from a CQL query string.

Returns self with page size set to the given value

Sets the page size for this CQL query.

Disables paging for this CQL query.

Returns the page size for this CQL query.

Sets the consistency to be used when executing this statement.

Gets the consistency to be used when executing this query if it is filled. If this is empty, the default_consistency of the session will be used.

Sets the serial consistency to be used when executing this statement. (Ignored unless the statement is an LWT)

Gets the serial consistency to be used when executing this statement. (Ignored unless the statement is an LWT)

Sets the idempotence of this statement A query is idempotent if it can be applied multiple times without changing the result of the initial application If set to true we can be sure that it is idempotent If set to false it is unknown whether it is idempotent This is used in RetryPolicy to decide if retrying a query is safe

Gets the idempotence of this statement

Sets a custom RetryPolicy to be used with this statement By default Session’s retry policy is used, this allows to use a custom retry policy

Gets custom RetryPolicy used by this statement

Enable or disable CQL Tracing for this statement If enabled session.query() will return a QueryResult containing tracing_id which can be used to query tracing information about the execution of this query

Gets whether tracing is enabled for this statement

Sets the default timestamp for this statement in microseconds. If not None, it will replace the server side assigned timestamp as default timestamp If a statement contains a USING TIMESTAMP clause, calling this method won’t change anything

Gets the default timestamp for this statement in microseconds.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more