pub struct SampleLineage {
pub parent_sample_name: String,
pub child_sample_name: String,
}Fields§
§parent_sample_name: String§child_sample_name: StringImplementations§
Source§impl SampleLineage
impl SampleLineage
pub fn select(conn: &Connection) -> SampleLineageSelect<'_>
pub fn all(conn: &Connection) -> Result<Vec<Self>, ModelSelectError>
Source§impl SampleLineage
impl SampleLineage
pub fn get_parents( conn: &GraphConnection, child_sample_name: &str, history_ref: Option<&str>, ) -> Vec<String>
pub fn get_children( conn: &GraphConnection, parent_sample_name: &str, history_ref: Option<&str>, ) -> Vec<String>
pub fn create( conn: &GraphConnection, parent_sample_name: &str, child_sample_name: &str, ) -> SQLResult<Self>
pub fn delete( conn: &GraphConnection, parent_sample_name: &str, child_sample_name: &str, ) -> SQLResult<()>
Trait Implementations§
Source§impl<'a> Capnp<'a> for SampleLineage
impl<'a> Capnp<'a> for SampleLineage
Source§impl Clone for SampleLineage
impl Clone for SampleLineage
Source§fn clone(&self) -> SampleLineage
fn clone(&self) -> SampleLineage
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 SampleLineage
impl Debug for SampleLineage
Source§impl<'de> Deserialize<'de> for SampleLineage
impl<'de> Deserialize<'de> for SampleLineage
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
impl Eq for SampleLineage
Source§impl PartialEq for SampleLineage
impl PartialEq for SampleLineage
Source§impl Serialize for SampleLineage
impl Serialize for SampleLineage
Source§impl SqlLineage for SampleLineage
impl SqlLineage for SampleLineage
const CHILD_COLUMN: &'static str = "child_sample_name"
const CHILD_ID_COLUMN: &'static str = "name"
const CHILD_TABLE_NAME: &'static str = "samples"
const PARENT_COLUMN: &'static str = "parent_sample_name"
const PARENT_ID_COLUMN: &'static str = "name"
const PARENT_TABLE_NAME: &'static str = "samples"
const TABLE_NAME: &'static str = "sample_lineage"
type Id = String
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 SampleLineage
Auto Trait Implementations§
impl Freeze for SampleLineage
impl RefUnwindSafe for SampleLineage
impl Send for SampleLineage
impl Sync for SampleLineage
impl Unpin for SampleLineage
impl UnsafeUnpin for SampleLineage
impl UnwindSafe for SampleLineage
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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