pub struct SbolObjectRepository { /* private fields */ }Implementations§
Source§impl SbolObjectRepository
impl SbolObjectRepository
pub fn new(pool: PgPool) -> Self
Sourcepub async fn upsert(
&self,
conn: &mut PgConnection,
summary: &ObjectSummary,
graph_id: Option<GraphId>,
) -> Result<UpsertResult, DomainError>
pub async fn upsert( &self, conn: &mut PgConnection, summary: &ObjectSummary, graph_id: Option<GraphId>, ) -> Result<UpsertResult, DomainError>
Insert or update by IRI. Returns the resulting object id, the new revision number, and the previous content hash (if any) so callers can detect a no-op.
pub async fn get_iri_by_id( &self, id: ObjectId, ) -> Result<Option<String>, DomainError>
pub async fn get_by_iri( &self, iri: &str, ) -> Result<Option<SbolObjectRecord>, DomainError>
Sourcepub async fn get_by_iris(
&self,
iris: &[&str],
) -> Result<Vec<SbolObjectRecord>, DomainError>
pub async fn get_by_iris( &self, iris: &[&str], ) -> Result<Vec<SbolObjectRecord>, DomainError>
Bulk variant of [get_by_iri]. Returns matching live rows in arbitrary
order; IRIs that don’t resolve are simply absent from the result. A
single indexed scan via iri = ANY($1).
Sourcepub async fn list(
&self,
filter: &ListObjectsFilter,
) -> Result<Vec<SbolObjectRecord>, DomainError>
pub async fn list( &self, filter: &ListObjectsFilter, ) -> Result<Vec<SbolObjectRecord>, DomainError>
Paginated listing for corpus-scale export. Keyset cursor on iri
(lexicographic ascending); pass the last iri of the prior page as
after_iri to fetch the next. Filters compose: when any of
sbol_class, role, or graph_id is Some, the corresponding
predicate is added to the WHERE clause.
Trait Implementations§
Source§impl Clone for SbolObjectRepository
impl Clone for SbolObjectRepository
Source§fn clone(&self) -> SbolObjectRepository
fn clone(&self) -> SbolObjectRepository
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for SbolObjectRepository
impl !UnwindSafe for SbolObjectRepository
impl Freeze for SbolObjectRepository
impl Send for SbolObjectRepository
impl Sync for SbolObjectRepository
impl Unpin for SbolObjectRepository
impl UnsafeUnpin for SbolObjectRepository
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<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