Skip to main content

SqlAdapterRunner

Struct SqlAdapterRunner 

Source
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>

Source

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>
where E: SqlExecutor, R: SqlRowReader<E::Row>,

Source

pub async fn create(self, query: Create) -> Result<DbRecord, RustAuthError>

Source

pub async fn find_one( self, query: FindOne, ) -> Result<Option<DbRecord>, RustAuthError>

Source

pub async fn find_many( self, query: FindMany, ) -> Result<Vec<DbRecord>, RustAuthError>

Source

pub async fn count(self, query: Count) -> Result<u64, RustAuthError>

Source

pub async fn update( self, query: Update, ) -> Result<Option<DbRecord>, RustAuthError>

Source

pub async fn update_many(self, query: UpdateMany) -> Result<u64, RustAuthError>

Source

pub async fn delete(self, query: Delete) -> Result<(), RustAuthError>

Source

pub async fn delete_many(self, query: DeleteMany) -> Result<u64, RustAuthError>

Auto Trait Implementations§

§

impl<'a, E, R> Freeze for SqlAdapterRunner<'a, E, R>
where E: Freeze, R: Freeze,

§

impl<'a, E, R> RefUnwindSafe for SqlAdapterRunner<'a, E, R>

§

impl<'a, E, R> Send for SqlAdapterRunner<'a, E, R>
where E: Send, R: Send,

§

impl<'a, E, R> Sync for SqlAdapterRunner<'a, E, R>
where E: Sync, R: Sync,

§

impl<'a, E, R> Unpin for SqlAdapterRunner<'a, E, R>
where E: Unpin, R: Unpin,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V