pub struct QueryParameters<'a> {
pub consistency: Consistency,
pub serial_consistency: Option<SerialConsistency>,
pub timestamp: Option<i64>,
pub page_size: Option<i32>,
pub paging_state: PagingState,
pub skip_metadata: bool,
pub values: Cow<'a, SerializedValues>,
}
Expand description
Various parameters controlling the execution of the statement.
Fields§
§consistency: Consistency
Consistency level for the query.
serial_consistency: Option<SerialConsistency>
Serial consistency level for the query, if specified.
timestamp: Option<i64>
Client-side-assigned timestamp for the query, if specified.
page_size: Option<i32>
Maximum number of rows to return for the query, if specified. If not specified, the server will not page the result, and instead return all rows in a single response. This is not recommended for large result sets, as it puts a lot of pressure on the server and network, as well as brings high memory usage on both client and server sides.
paging_state: PagingState
Paging state for the query, used to resume fetching results from a previous query. If empty paging state is provided, the query will start from the beginning.
skip_metadata: bool
Whether to skip metadata for the values in the result set. This is an optimisation that can be used when the client does not need the metadata for the values, because it has already been fetched upon preparing the statement.
values: Cow<'a, SerializedValues>
Values bound to the statements.
Implementations§
Source§impl QueryParameters<'_>
impl QueryParameters<'_>
Source§impl QueryParameters<'_>
impl QueryParameters<'_>
Sourcepub fn deserialize(buf: &mut &[u8]) -> Result<Self, RequestDeserializationError>
pub fn deserialize(buf: &mut &[u8]) -> Result<Self, RequestDeserializationError>
Deserializes the parameters from the provided buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QueryParameters<'a>
impl<'a> RefUnwindSafe for QueryParameters<'a>
impl<'a> Send for QueryParameters<'a>
impl<'a> Sync for QueryParameters<'a>
impl<'a> Unpin for QueryParameters<'a>
impl<'a> UnwindSafe for QueryParameters<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more