Struct rincon_session::client::NewCursor
[−]
[src]
pub struct NewCursor { /* fields omitted */ }
This struct defines the parameters of a cursor for an AQL query that is to be created.
Methods
impl NewCursor
[src]
pub fn new(query: Query) -> NewCursor
[src]
Constructs a new instance of NewCursor
from the given Query
.
pub fn query(&self) -> &str
[src]
Returns the query string to be executed.
pub fn bind_vars(&self) -> &HashMap<String, Value, RandomState>
[src]
Returns the bind parameters of this Query
.
pub fn set_count<C>(&mut self, count: C) where
C: Into<Option<bool>>,
[src]
C: Into<Option<bool>>,
Sets the flag whether number of documents in the result set should be returned.
Calculating the 'count' attribute might have a performance impact for some queries in the future so this option is turned off by default, and 'count' is only returned when requested.
pub fn is_count(&self) -> Option<bool>
[src]
Returns whether the number of documents in the result set should be returned in the "count" attribute of the result.
pub fn set_batch_size<S>(&mut self, batch_size: S) where
S: Into<Option<u32>>,
[src]
S: Into<Option<u32>>,
Sets the maximum number of result documents to be transferred from the server to the client in one round-trip.
If this attribute is not set, a server-controlled default value will be used. A batchSize value of 0 is disallowed.
pub fn batch_size(&self) -> Option<u32>
[src]
Returns the maximum number of result documents to be transferred from the server to the client in one round-trip.
pub fn set_cache<C>(&mut self, cache: C) where
C: Into<Option<bool>>,
[src]
C: Into<Option<bool>>,
Sets the flag that indicates whether the AQL query cache shall be used.
If set to false, then any query cache lookup will be skipped for the query. If set to true, it will lead to the query cache being checked for the query if the query cache mode is either on or demand.
pub fn is_cache(&self) -> Option<bool>
[src]
Returns whether the AQL query cache shall be used.
pub fn set_memory_limit<L>(&mut self, memory_limit: L) where
L: Into<Option<u64>>,
[src]
L: Into<Option<u64>>,
Sets the maximum number of memory (measured in bytes) that the query is allowed to use.
If set, then the query will fail with error 'resource limit exceeded' in case it allocates too much memory. A value of 0 indicates that there is no memory limit.
pub fn memory_limit(&self) -> Option<u64>
[src]
Returns the maximum number of memory (measured in bytes) that the query is allowed to use.
pub fn set_ttl<T>(&mut self, ttl: T) where
T: Into<Option<u32>>,
[src]
T: Into<Option<u32>>,
Sets the time-to-live for the cursor (in seconds).
The cursor will be removed on the server automatically after the specified amount of time. This is useful to ensure garbage collection of cursors that are not fully fetched by clients. If not set, a server-defined value will be used.
pub fn ttl(&self) -> Option<u32>
[src]
Returns the time-to-live for the cursor (in seconds).
pub fn options_mut(&mut self) -> &mut CursorOptions
[src]
Returns the optional cursor options as mutable reference for changing the optional cursor options in place.
The cursor options can be used to tweak query execution.
pub fn remove_options(&mut self) -> Option<CursorOptions>
[src]
Removes the currently set options from this struct and returns them.
pub fn options(&self) -> Option<&CursorOptions>
[src]
Returns the optional cursor options for tweaking query execution.
Trait Implementations
impl PartialEq<NewCursor> for NewCursor
[src]
fn eq(&self, __arg_0: &NewCursor) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NewCursor) -> bool
[src]
This method tests for !=
.
impl Serialize for NewCursor
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl From<Query> for NewCursor
[src]
impl Clone for NewCursor
[src]
fn clone(&self) -> NewCursor
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more