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 · 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
Source§impl PartialEq for BlockGroupLineage
impl PartialEq for BlockGroupLineage
Source§impl Query for BlockGroupLineage
impl Query for BlockGroupLineage
const PRIMARY_KEY: &'static str = "id"
const TABLE_NAME: &'static str = "block_groups"
type Model = BlockGroupLineage
fn process_row(row: &Row<'_>) -> Self::Model
fn query( conn: &Connection, query: &str, params: impl Params, ) -> Vec<Self::Model>
fn get( conn: &Connection, query: &str, params: impl Params, ) -> Result<Self::Model>
fn get_by_id<'a, T>(conn: &Connection, id: &'a T) -> Option<Self::Model>
fn query_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn delete_by_ids<'a, I: ?Sized, T>( conn: &Connection, ids: &'a I, ) -> Vec<Self::Model>
fn table_name() -> &'static str
fn all(conn: &Connection) -> Vec<Self::Model>
fn all_with_limit(conn: &Connection, limit: usize) -> Vec<Self::Model>
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"
type Id = HashId
fn parent_id(&self) -> &Self::Id
fn child_id(&self) -> &Self::Id
fn get_ancestors( conn: &Connection, child_id: &Self::Id, max_depth: Option<usize>, ) -> Vec<Self::Id>
fn get_descendants( conn: &Connection, parent_id: &Self::Id, max_depth: Option<usize>, ) -> Vec<Self::Id>
fn get_graph(conn: &Connection) -> Vec<Self>
fn get_path_between( conn: &Connection, source_id: &Self::Id, target_id: &Self::Id, ) -> Vec<Self::Id>
fn get_path_edges_between( conn: &Connection, source_id: &Self::Id, target_id: &Self::Id, ) -> Vec<Self>
impl Eq for BlockGroupLineage
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> 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