pub enum SqlDialect {
Postgres,
MySql,
Sqlite,
}Expand description
SQL dialect supported by RustAuth’s shared SQL planner.
Variants§
Implementations§
Source§impl SqlDialect
impl SqlDialect
pub fn quote_identifier(self, identifier: &str) -> Result<String, RustAuthError>
pub fn sanitize_identifier( self, identifier: &str, ) -> Result<String, RustAuthError>
pub fn placeholder(self, index: usize) -> String
pub fn where_clause( self, table: &DbTable, clauses: &[Where], ) -> Result<SqlFragment, RustAuthError>
pub fn where_clause_starting_at( self, table: &DbTable, clauses: &[Where], first_placeholder: usize, ) -> Result<SqlFragment, RustAuthError>
pub fn order_limit_offset( self, table: &DbTable, sort_by: Option<&Sort>, limit: Option<usize>, offset: Option<usize>, ) -> Result<String, RustAuthError>
pub fn column_definition( self, logical_name: &str, field: &DbField, ) -> Result<String, RustAuthError>
pub fn create_table_statement( self, table: &DbTable, ) -> Result<String, RustAuthError>
pub fn add_column_statement( self, table: &str, logical_name: &str, field: &DbField, ) -> Result<String, RustAuthError>
pub fn create_index_statement( self, table: &str, column: &str, index: &str, unique: bool, ) -> Result<String, RustAuthError>
pub fn sql_type(self, logical_name: &str, field: &DbField) -> String
pub fn type_matches(self, actual: &str, field: &DbField) -> bool
Source§impl SqlDialect
impl SqlDialect
pub fn supports_insert_returning(self) -> bool
Trait Implementations§
Source§impl Clone for SqlDialect
impl Clone for SqlDialect
Source§fn clone(&self) -> SqlDialect
fn clone(&self) -> SqlDialect
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 moreimpl Copy for SqlDialect
Source§impl Debug for SqlDialect
impl Debug for SqlDialect
Source§impl<'de> Deserialize<'de> for SqlDialect
impl<'de> Deserialize<'de> for SqlDialect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SqlDialect
Source§impl PartialEq for SqlDialect
impl PartialEq for SqlDialect
Source§fn eq(&self, other: &SqlDialect) -> bool
fn eq(&self, other: &SqlDialect) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SqlDialect
impl Serialize for SqlDialect
impl StructuralPartialEq for SqlDialect
Auto Trait Implementations§
impl Freeze for SqlDialect
impl RefUnwindSafe for SqlDialect
impl Send for SqlDialect
impl Sync for SqlDialect
impl Unpin for SqlDialect
impl UnsafeUnpin for SqlDialect
impl UnwindSafe for SqlDialect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.