pub struct SqlAdapterRunner<'a, E, R> { /* private fields */ }Expand description
Shared CRUD runner for SQL adapters that can execute raw SQL.
Implementations§
Source§impl<'a, E, R> SqlAdapterRunner<'a, E, R>
impl<'a, E, R> SqlAdapterRunner<'a, E, R>
Sourcepub fn new(
dialect: SqlDialect,
schema: &'a DbSchema,
executor: E,
row_reader: R,
) -> Self
pub fn new( dialect: SqlDialect, schema: &'a DbSchema, executor: E, row_reader: R, ) -> Self
Creates a runner for one adapter operation.
Source§impl<E, R> SqlAdapterRunner<'_, E, R>
impl<E, R> SqlAdapterRunner<'_, E, R>
pub async fn create(self, query: Create) -> Result<DbRecord, RustAuthError>
pub async fn find_one( self, query: FindOne, ) -> Result<Option<DbRecord>, RustAuthError>
pub async fn find_many( self, query: FindMany, ) -> Result<Vec<DbRecord>, RustAuthError>
pub async fn count(self, query: Count) -> Result<u64, RustAuthError>
pub async fn update( self, query: Update, ) -> Result<Option<DbRecord>, RustAuthError>
pub async fn update_many(self, query: UpdateMany) -> Result<u64, RustAuthError>
pub async fn delete(self, query: Delete) -> Result<(), RustAuthError>
pub async fn delete_many(self, query: DeleteMany) -> Result<u64, RustAuthError>
Auto Trait Implementations§
impl<'a, E, R> Freeze for SqlAdapterRunner<'a, E, R>
impl<'a, E, R> RefUnwindSafe for SqlAdapterRunner<'a, E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<'a, E, R> Send for SqlAdapterRunner<'a, E, R>
impl<'a, E, R> Sync for SqlAdapterRunner<'a, E, R>
impl<'a, E, R> Unpin for SqlAdapterRunner<'a, E, R>
impl<'a, E, R> UnsafeUnpin for SqlAdapterRunner<'a, E, R>where
E: UnsafeUnpin,
R: UnsafeUnpin,
impl<'a, E, R> UnwindSafe for SqlAdapterRunner<'a, E, R>where
E: UnwindSafe,
R: UnwindSafe,
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