Struct edgedb_query::models::edge_query::EdgeQuery
source · [−]Expand description
EgdeQuery represents a edgeDB query.
It combines the string query and its query arguments
query : the string query
args : the query arguments
Examples
use edgedb_protocol::codec::ObjectShape;
use edgedb_protocol::descriptors::{ShapeElement, TypePos};
use edgedb_protocol::value::Value;
use edgedb_protocol::common::Cardinality;
use edgedb_query::models::edge_query::EdgeQuery;
let shape: &[ShapeElement] = &[ShapeElement {
flag_implicit: false,
flag_link_property: false,
flag_link: false,
cardinality: Some(Cardinality::One),
name: "var".to_string(),
type_pos: TypePos(0),
}];
let args = Some(Value::Object {
shape: ObjectShape::from(shape),
fields: vec![Some(Value::Str(String::from("Rust")))],
});
let query = "Select 'I love ' ++ <str>$var".to_owned();
let edge_query = EdgeQuery { query, args };
Fields
query: Stringargs: Option<Value>Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EdgeQuery
impl Send for EdgeQuery
impl Sync for EdgeQuery
impl Unpin for EdgeQuery
impl UnwindSafe for EdgeQuery
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more