pub struct WriteBatch {
pub entries: Vec<BatchEntry>,
pub returns: Vec<String>,
}Expand description
Write-capable query batch.
Fields§
§entries: Vec<BatchEntry>Batch entries in execution order.
returns: Vec<String>Variables to return.
Implementations§
Source§impl WriteBatch
impl WriteBatch
Sourcepub fn new() -> WriteBatch
pub fn new() -> WriteBatch
Create an empty write batch.
Sourcepub fn var_as<S, M>(self, name: &str, traversal: Traversal<S, M>) -> WriteBatchwhere
S: TraversalState,
M: MutationMode,
pub fn var_as<S, M>(self, name: &str, traversal: Traversal<S, M>) -> WriteBatchwhere
S: TraversalState,
M: MutationMode,
Add a named traversal.
Sourcepub fn var_as_if<S, M>(
self,
name: &str,
condition: BatchCondition,
traversal: Traversal<S, M>,
) -> WriteBatchwhere
S: TraversalState,
M: MutationMode,
pub fn var_as_if<S, M>(
self,
name: &str,
condition: BatchCondition,
traversal: Traversal<S, M>,
) -> WriteBatchwhere
S: TraversalState,
M: MutationMode,
Add a conditional named traversal.
Sourcepub fn for_each_param(self, param: &str, body: WriteBatch) -> WriteBatch
pub fn for_each_param(self, param: &str, body: WriteBatch) -> WriteBatch
Add a for-each body.
Sourcepub fn returning<I, S>(self, vars: I) -> WriteBatch
pub fn returning<I, S>(self, vars: I) -> WriteBatch
Set returned variables.
Trait Implementations§
Source§impl Clone for WriteBatch
impl Clone for WriteBatch
Source§fn clone(&self) -> WriteBatch
fn clone(&self) -> WriteBatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WriteBatch
impl Debug for WriteBatch
Source§impl Default for WriteBatch
impl Default for WriteBatch
Source§fn default() -> WriteBatch
fn default() -> WriteBatch
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WriteBatch
impl<'de> Deserialize<'de> for WriteBatch
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WriteBatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WriteBatch, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WriteBatch
impl PartialEq for WriteBatch
Source§impl Serialize for WriteBatch
impl Serialize for WriteBatch
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&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 StructuralPartialEq for WriteBatch
Auto Trait Implementations§
impl Freeze for WriteBatch
impl RefUnwindSafe for WriteBatch
impl Send for WriteBatch
impl Sync for WriteBatch
impl Unpin for WriteBatch
impl UnsafeUnpin for WriteBatch
impl UnwindSafe for WriteBatch
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
Mutably borrows from an owned value. Read more