pub struct ReadonlyRepository<T: Entity = Row> { /* private fields */ }Implementations§
Source§impl<T: Entity> ReadonlyRepository<T>
impl<T: Entity> ReadonlyRepository<T>
pub fn new( connection: Arc<dyn Connection>, options: ReadonlyRepositoryMappingOptions, ) -> Result<Self>
pub fn schema(&self) -> &Schema
pub fn from_built(built: BuiltRepository) -> Self
pub fn add_enriched<TRelated: Entity>( &mut self, enrichment: Enrichment, via: impl EnrichmentVia<TRelated>, strategy: Option<Arc<dyn ReadonlyEnrichmentStrategy<T, TRelated>>>, ) -> &mut Self
pub fn add_middleware(&mut self, middleware: Arc<dyn CommandMiddleware>)
pub async fn read_single( &self, query: Option<&dyn Statement>, options: Option<&ReadonlyRepositoryMappingOptions>, ) -> Result<Option<T>>
pub fn read<'a>( &'a self, query: Option<&'a dyn Statement>, options: Option<&'a ReadonlyRepositoryMappingOptions>, ) -> Pin<Box<dyn Stream<Item = Result<T>> + Send + 'a>>
pub async fn read_single_where( &self, clause: &dyn IWhere, options: Option<&ReadonlyRepositoryMappingOptions>, ) -> Result<Option<T>>
pub fn read_where<'a>( &'a self, clause: &'a dyn IWhere, options: Option<&'a ReadonlyRepositoryMappingOptions>, ) -> Pin<Box<dyn Stream<Item = Result<T>> + Send + 'a>>
Trait Implementations§
Source§impl<T: Entity> IReadonlyRepository<T> for ReadonlyRepository<T>
impl<T: Entity> IReadonlyRepository<T> for ReadonlyRepository<T>
fn read_single<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: Option<&'life1 dyn Statement>,
options: Option<&'life2 ReadonlyRepositoryMappingOptions>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read<'a>( &'a self, query: Option<&'a dyn Statement>, options: Option<&'a ReadonlyRepositoryMappingOptions>, ) -> Pin<Box<dyn Stream<Item = Result<T>> + Send + 'a>>
fn read_single_where<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
clause: &'life1 dyn IWhere,
options: Option<&'life2 ReadonlyRepositoryMappingOptions>,
) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_where<'a>( &'a self, clause: &'a dyn IWhere, options: Option<&'a ReadonlyRepositoryMappingOptions>, ) -> Pin<Box<dyn Stream<Item = Result<T>> + Send + 'a>>
fn is_schema_required(&self) -> bool
fn to_crud(self: Arc<Self>) -> Option<Arc<dyn ICRUDRepository<T>>>where
Self: Sized,
Source§impl<T: Entity> IRepository for ReadonlyRepository<T>
impl<T: Entity> IRepository for ReadonlyRepository<T>
Auto Trait Implementations§
impl<T = HashMap<String, Value>> !RefUnwindSafe for ReadonlyRepository<T>
impl<T = HashMap<String, Value>> !UnwindSafe for ReadonlyRepository<T>
impl<T> Forget for ReadonlyRepository<T>
impl<T> Freeze for ReadonlyRepository<T>
impl<T> Move for ReadonlyRepository<T>
impl<T> Send for ReadonlyRepository<T>
impl<T> Sync for ReadonlyRepository<T>
impl<T> Unpin for ReadonlyRepository<T>
impl<T> UnsafeUnpin for ReadonlyRepository<T>
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