pub struct BlockGroupLineage {
pub parent_block_group_id: HashId,
pub child_block_group_id: HashId,
}Fields§
§parent_block_group_id: HashId§child_block_group_id: HashIdImplementations§
Source§impl BlockGroupLineage
impl BlockGroupLineage
pub fn get_parents( conn: &GraphConnection, child_block_group_id: &HashId, ) -> Vec<HashId>
pub fn get_children( conn: &GraphConnection, parent_block_group_id: &HashId, ) -> Vec<HashId>
pub fn get_parent_block_groups( conn: &GraphConnection, child_block_group_id: &HashId, ) -> Vec<BlockGroup>
pub fn get_ancestor_block_groups( conn: &GraphConnection, child_block_group_id: &HashId, max_depth: Option<usize>, ) -> Vec<BlockGroup>
pub fn get_descendant_block_groups( conn: &GraphConnection, parent_block_group_id: &HashId, max_depth: Option<usize>, ) -> Vec<BlockGroup>
Trait Implementations§
Source§impl Clone for BlockGroupLineage
impl Clone for BlockGroupLineage
Source§fn clone(&self) -> BlockGroupLineage
fn clone(&self) -> BlockGroupLineage
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 BlockGroupLineage
impl Debug for BlockGroupLineage
impl Eq for BlockGroupLineage
Source§impl PartialEq for BlockGroupLineage
impl PartialEq for BlockGroupLineage
Source§impl SqlLineage for BlockGroupLineage
impl SqlLineage for BlockGroupLineage
const CHILD_COLUMN: &'static str = "id"
const CHILD_ID_COLUMN: &'static str = "id"
const CHILD_TABLE_NAME: &'static str = "block_groups"
const PARENT_COLUMN: &'static str = "parent_block_group_id"
const PARENT_ID_COLUMN: &'static str = "id"
const PARENT_TABLE_NAME: &'static str = "block_groups"
const TABLE_NAME: &'static str = "block_groups"
type Id = HashId
fn parent_id(&self) -> &Self::Id
fn child_id(&self) -> &Self::Id
fn process_row(row: &Row<'_>) -> Result<Self>
Source§fn get_roots_page(
conn: &Connection,
limit: usize,
offset: u32,
history_ref: Option<&str>,
) -> LineagePage<Self::Id>
fn get_roots_page( conn: &Connection, limit: usize, offset: u32, history_ref: Option<&str>, ) -> LineagePage<Self::Id>
Return root entities that have no incoming lineage edge.
Source§fn get_children_page(
conn: &Connection,
parent_id: &Self::Id,
limit: usize,
offset: u32,
history_ref: Option<&str>,
) -> LineagePage<Self::Id>
fn get_children_page( conn: &Connection, parent_id: &Self::Id, limit: usize, offset: u32, history_ref: Option<&str>, ) -> LineagePage<Self::Id>
Return direct children in a stable, offset-paginated order.
Source§fn get_descendants_page(
conn: &Connection,
parent_id: &Self::Id,
max_depth: Option<usize>,
limit: usize,
offset: u32,
history_ref: Option<&str>,
) -> LineagePage<Self::Id>
fn get_descendants_page( conn: &Connection, parent_id: &Self::Id, max_depth: Option<usize>, limit: usize, offset: u32, history_ref: Option<&str>, ) -> LineagePage<Self::Id>
Return descendants ordered by minimum depth and ID with a global page bound. Read more
Source§fn get_ancestors_page(
conn: &Connection,
child_id: &Self::Id,
max_depth: Option<usize>,
limit: usize,
offset: u32,
history_ref: Option<&str>,
) -> LineagePage<Self::Id>
fn get_ancestors_page( conn: &Connection, child_id: &Self::Id, max_depth: Option<usize>, limit: usize, offset: u32, history_ref: Option<&str>, ) -> LineagePage<Self::Id>
Return ancestors ordered by minimum depth and ID with a global page bound. Read more
fn get_ancestors( conn: &Connection, child_id: &Self::Id, max_depth: Option<usize>, history_ref: Option<&str>, ) -> Vec<Self::Id>
Source§fn get_descendants(
conn: &Connection,
parent_id: &Self::Id,
max_depth: Option<usize>,
history_ref: Option<&str>,
) -> Vec<Self::Id>
fn get_descendants( conn: &Connection, parent_id: &Self::Id, max_depth: Option<usize>, history_ref: Option<&str>, ) -> Vec<Self::Id>
Return unique descendants ordered by minimum depth, then child ID.
Both lineage edges and child entities are read at
history_ref when supplied.fn get_graph(conn: &Connection, history_ref: Option<&str>) -> Vec<Self>
fn get_path_between( conn: &Connection, source_id: &Self::Id, target_id: &Self::Id, history_ref: Option<&str>, ) -> Vec<Self::Id>
fn get_path_edges_between( conn: &Connection, source_id: &Self::Id, target_id: &Self::Id, history_ref: Option<&str>, ) -> Vec<Self>
impl StructuralPartialEq for BlockGroupLineage
Auto Trait Implementations§
impl Freeze for BlockGroupLineage
impl RefUnwindSafe for BlockGroupLineage
impl Send for BlockGroupLineage
impl Sync for BlockGroupLineage
impl Unpin for BlockGroupLineage
impl UnsafeUnpin for BlockGroupLineage
impl UnwindSafe for BlockGroupLineage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
Converts
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> ⓘ
Converts
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