pub struct QueryGraphParams {
pub entity_name: Result<String, DbErr>,
pub relation_name: Result<String, DbErr>,
pub reverse_direction: bool,
pub root_node_names: Vec<String>,
pub max_depth: Option<u64>,
pub batch_sort_key: Option<String>,
pub batch_sort_asc: bool,
pub max_batch_size: Option<usize>,
pub max_total_size: Option<usize>,
}Expand description
A helper struct to specify how to perform a graph query
Fields§
§entity_name: Result<String, DbErr>Which entity to consider for constructing the graph (unformatted)
relation_name: Result<String, DbErr>Which relation to consider for constructing the graph (unformatted)
reverse_direction: boolWhether to reverse the direction when constructing the graph
root_node_names: Vec<String>Specify the root nodes to be the nodes with the supplied names The keys in the HashMaps must be Formatted.
max_depth: Option<u64>Recursion goes up to this level, 0 means no recursion at all. Recursion does not terminate early if this value is None.
batch_sort_key: Option<String>Sort each batch on this key (this value is a Formatted column name).
This key is also used as for filling the weight field of queried nodes, if supplied.
The order is random if this value is None.
batch_sort_asc: boolSort each batch in an ascending order if this value is true.
max_batch_size: Option<usize>Include up to this number of nodes in each batch. All nodes are included in all batches if this value is None.
max_total_size: Option<usize>Include up to this number of nodes across the whole recursion. All nodes are included if this value is None.
Implementations§
Source§impl QueryGraphParams
impl QueryGraphParams
Sourcepub fn from_query_graph_metadata(metadata: QueryGraphJson) -> Self
pub fn from_query_graph_metadata(metadata: QueryGraphJson) -> Self
Construct params from metadata
Trait Implementations§
Source§impl Debug for QueryGraphParams
impl Debug for QueryGraphParams
Auto Trait Implementations§
impl Freeze for QueryGraphParams
impl RefUnwindSafe for QueryGraphParams
impl Send for QueryGraphParams
impl Sync for QueryGraphParams
impl Unpin for QueryGraphParams
impl UnwindSafe for QueryGraphParams
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more