pub struct BaseRepository<T>{
pub query_executor: Arc<Box<dyn QueryExecutor>>,
/* private fields */
}Fields§
§query_executor: Arc<Box<dyn QueryExecutor>>Implementations§
Source§impl<T> BaseRepository<T>
impl<T> BaseRepository<T>
pub fn new(query_executor: Box<dyn QueryExecutor>, table_name: String) -> Self
pub fn get_table_name(&self) -> &str
Trait Implementations§
Source§impl<T> Repository<T> for BaseRepository<T>
impl<T> Repository<T> for BaseRepository<T>
fn find_by_id<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<Option<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
options: &'life1 QueryOptions,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<T>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entity: &'life1 T,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_id: &'life1 str,
entity: &'life2 T,
context: &'life3 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
context: &'life2 QueryContext,
) -> Pin<Box<dyn Future<Output = DatabaseResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl<T> Freeze for BaseRepository<T>
impl<T> !RefUnwindSafe for BaseRepository<T>
impl<T> Send for BaseRepository<T>
impl<T> Sync for BaseRepository<T>
impl<T> Unpin for BaseRepository<T>where
T: Unpin,
impl<T> !UnwindSafe for BaseRepository<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
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