pub enum Dialect {
Sqlite,
Postgres,
}Expand description
Which dialect is on the other end of a connection.
Reached through Database::dialect. Only two things ever branch on it:
the identifier search in order.rs, whose JSON functions have no shared
spelling, and is_unique_violation_on.
Variants§
Implementations§
Source§impl Dialect
impl Dialect
Sourcepub fn json_array_source(self, column: &str) -> String
pub fn json_array_source(self, column: &str) -> String
The FROM fragment that walks the JSON array in column, aliased
ident.
orders.identifiers is a JSON array of {type, value} objects and the
operator listing matches a name inside it. Neither dialect indexes that,
so it is a scan either way — defensible on an operator-driven listing
over a retention-swept table, and the reason this is three words of
dialect rather than two whole queries.
Sourcepub fn json_member(self, member: &str) -> String
pub fn json_member(self, member: &str) -> String
The element’s value member, as text, from the alias above.
Sourcepub fn substring_position(self) -> &'static str
pub fn substring_position(self) -> &'static str
haystack, needle substring search returning a 1-based position.
Deliberately not PostgreSQL’s position(needle in haystack): it takes
its arguments the other way round, so the two dialects would bind in
different orders from one push_bind sequence. strpos matches
instr’s order, which is what keeps the caller dialect-free.
Trait Implementations§
impl Copy for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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