pub struct SqliteAdapter { /* private fields */ }Implementations§
Source§impl SqliteAdapter
impl SqliteAdapter
pub fn new(pool: SqlitePool) -> Self
pub fn with_schema(pool: SqlitePool, schema: DbSchema) -> Self
pub async fn connect(database_url: &str) -> Result<Self, OpenAuthError>
pub async fn connect_with_schema( database_url: &str, schema: DbSchema, ) -> Result<Self, OpenAuthError>
pub async fn plan_migrations( &self, schema: &DbSchema, ) -> Result<SchemaMigrationPlan, OpenAuthError>
pub async fn compile_migrations( &self, schema: &DbSchema, ) -> Result<String, OpenAuthError>
Trait Implementations§
Source§impl Clone for SqliteAdapter
impl Clone for SqliteAdapter
Source§fn clone(&self) -> SqliteAdapter
fn clone(&self) -> SqliteAdapter
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 moreSource§impl DbAdapter for SqliteAdapter
impl DbAdapter for SqliteAdapter
fn id(&self) -> &str
fn capabilities(&self) -> AdapterCapabilities
fn create<'a>(&'a self, query: Create) -> AdapterFuture<'a, DbRecord>
fn find_one<'a>(&'a self, query: FindOne) -> AdapterFuture<'a, Option<DbRecord>>
fn find_many<'a>(&'a self, query: FindMany) -> AdapterFuture<'a, Vec<DbRecord>>
fn count<'a>(&'a self, query: Count) -> AdapterFuture<'a, u64>
fn update<'a>(&'a self, query: Update) -> AdapterFuture<'a, Option<DbRecord>>
fn update_many<'a>(&'a self, query: UpdateMany) -> AdapterFuture<'a, u64>
fn delete<'a>(&'a self, query: Delete) -> AdapterFuture<'a, ()>
fn delete_many<'a>(&'a self, query: DeleteMany) -> AdapterFuture<'a, u64>
fn transaction<'a>( &'a self, callback: TransactionCallback<'a>, ) -> AdapterFuture<'a, ()>
fn create_schema<'a>( &'a self, schema: &'a DbSchema, _file: Option<&'a str>, ) -> AdapterFuture<'a, Option<SchemaCreation>>
fn run_migrations<'a>(&'a self, schema: &'a DbSchema) -> AdapterFuture<'a, ()>
Source§impl Debug for SqliteAdapter
impl Debug for SqliteAdapter
Source§impl From<&SqliteAdapter> for SqliteRateLimitStore
impl From<&SqliteAdapter> for SqliteRateLimitStore
Source§fn from(adapter: &SqliteAdapter) -> Self
fn from(adapter: &SqliteAdapter) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SqliteAdapter
impl !RefUnwindSafe for SqliteAdapter
impl Send for SqliteAdapter
impl Sync for SqliteAdapter
impl Unpin for SqliteAdapter
impl UnsafeUnpin for SqliteAdapter
impl !UnwindSafe for SqliteAdapter
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