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 get_parents( conn: &GraphConnection, child_sample_name: &str, ) -> Vec<String>
pub fn get_children( conn: &GraphConnection, parent_sample_name: &str, ) -> Vec<String>
pub fn search_name(conn: &GraphConnection, name: &str) -> Vec<Self>
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 · 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
Source§impl PartialEq for SampleLineage
impl PartialEq for SampleLineage
Source§impl Query for SampleLineage
impl Query for SampleLineage
const PRIMARY_KEY: &'static str = "parent_sample_name"
const TABLE_NAME: &'static str = "sample_lineage"
type Model = SampleLineage
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 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"
type Id = String
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 SampleLineage
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,
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