pub struct GraphLookup {
pub from: String,
pub start_with: String,
pub connect_from_field: String,
pub connect_to_field: String,
pub as_field: String,
pub max_depth: Option<u32>,
pub depth_field: Option<String>,
pub restrict_search_with_match: Option<Value>,
}Expand description
A $graphLookup stage for recursive lookups.
Fields§
§from: StringThe collection to search.
start_with: StringStarting value expression.
connect_from_field: StringField to connect from.
connect_to_field: StringField to connect to.
as_field: StringOutput array field.
max_depth: Option<u32>Maximum recursion depth.
depth_field: Option<String>Name for depth field.
restrict_search_with_match: Option<Value>Filter to apply at each level.
Implementations§
Source§impl GraphLookup
impl GraphLookup
Sourcepub fn new(
from: impl Into<String>,
start_with: impl Into<String>,
connect_from: impl Into<String>,
connect_to: impl Into<String>,
as_field: impl Into<String>,
) -> Self
pub fn new( from: impl Into<String>, start_with: impl Into<String>, connect_from: impl Into<String>, connect_to: impl Into<String>, as_field: impl Into<String>, ) -> Self
Create a new $graphLookup.
Sourcepub fn depth_field(self, field: impl Into<String>) -> Self
pub fn depth_field(self, field: impl Into<String>) -> Self
Add a depth field to results.
Sourcepub fn restrict_search(self, filter: JsonValue) -> Self
pub fn restrict_search(self, filter: JsonValue) -> Self
Add a filter for each recursion level.
Trait Implementations§
Source§impl Clone for GraphLookup
impl Clone for GraphLookup
Source§fn clone(&self) -> GraphLookup
fn clone(&self) -> GraphLookup
Returns a duplicate of the value. Read more
1.0.0 · 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 GraphLookup
impl Debug for GraphLookup
Source§impl<'de> Deserialize<'de> for GraphLookup
impl<'de> Deserialize<'de> for GraphLookup
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GraphLookup
impl PartialEq for GraphLookup
Source§impl Serialize for GraphLookup
impl Serialize for GraphLookup
impl StructuralPartialEq for GraphLookup
Auto Trait Implementations§
impl Freeze for GraphLookup
impl RefUnwindSafe for GraphLookup
impl Send for GraphLookup
impl Sync for GraphLookup
impl Unpin for GraphLookup
impl UnwindSafe for GraphLookup
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