[−][src]Struct arangoq::arango_api::ArangoQuery
Implementations
impl ArangoQuery
[src]
#[must_use]pub fn with_bind_vars(query: &str, bind_vars: BTreeMap<String, Value>) -> Self
[src]
Same as raw, but with &str
#[must_use]pub fn raw(query: String, bind_vars: BTreeMap<String, Value>) -> Self
[src]
ⓘThis example is not tested
let mut bind_vars = std::collections::BTreeMap::new(); bind_vars.insert( "@conactcoll".to_owned(), serde_json::Value::String(conactcoll.clone()), ); bind_vars.insert("email".to_owned(), serde_json::Value::String("aaa@bbb.ccc")); let raw_query = "FOR c IN @@conactcoll FOR b IN @@balancecoll FILTER c.email == @email RETURN b"; let query = ArangoQuery::raw(raw_query.to_owned(), bind_vars); match query.try_exec::<CreditBalance>(&conn).await { Ok(ar) => ar.result, Err(_) => vec![], }
#[must_use]pub fn raw_batched(
query: String,
bind_vars: BTreeMap<String, Value>,
batch_size: usize
) -> Self
[src]
query: String,
bind_vars: BTreeMap<String, Value>,
batch_size: usize
) -> Self
Returns results in batches of size batch_size
ⓘThis example is not tested
let query = ArangoQuery::raw_batched(raw_query.to_owned(), bind_vars, 100);
#[must_use]pub fn into_batched(self, batch_size: usize) -> Self
[src]
Converts an existing query to batched
of size batch_size
.
#[must_use]pub fn full_count(self, full_count: bool) -> Self
[src]
Enables fullCount
in the query stats of an existing query.
pub fn try_exec<T: Serialize + DeserializeOwned>(
&self,
dbc: &ArangoConnection
) -> impl Future<Output = Result<ArangoResponse<T>, Error>>
[src]
&self,
dbc: &ArangoConnection
) -> impl Future<Output = Result<ArangoResponse<T>, Error>>
Executes this query using the provided ArangoConnection
.
Returns ArangoResponse
Errors
Returns reqwest::Error
Note: reqwest::Error
is temporarily exposed and may change in the future.
Trait Implementations
impl Debug for ArangoQuery
[src]
impl Default for ArangoQuery
[src]
fn default() -> ArangoQuery
[src]
impl From<ArangoQuery> for Body
[src]
fn from(item: ArangoQuery) -> Self
[src]
impl PartialEq<ArangoQuery> for ArangoQuery
[src]
fn eq(&self, other: &ArangoQuery) -> bool
[src]
fn ne(&self, other: &ArangoQuery) -> bool
[src]
impl Serialize for ArangoQuery
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for ArangoQuery
[src]
Auto Trait Implementations
impl RefUnwindSafe for ArangoQuery
impl Send for ArangoQuery
impl Sync for ArangoQuery
impl Unpin for ArangoQuery
impl UnwindSafe for ArangoQuery
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,
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, 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.
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>,