pub enum DatabaseType {
PostgreSQL,
MySQL,
SQLite,
SQLServer,
}Expand description
Database types supported by FraiseQL.
§Stability
This enum is intentionally not #[non_exhaustive]. All match sites in the
codebase must handle every variant explicitly, giving compile-time assurance that
new database backends are fully integrated before release.
Adding a new variant is a semver-breaking change (minor version bump with
migration guide), because downstream exhaustive match expressions will fail
to compile. If you match on DatabaseType and want forward compatibility, add
a wildcard arm:
match db_type {
DatabaseType::PostgreSQL => { /* ... */ }
DatabaseType::MySQL => { /* ... */ }
DatabaseType::SQLite => { /* ... */ }
DatabaseType::SQLServer => { /* ... */ }
// no wildcard needed — exhaustive by design
}Variants§
PostgreSQL
PostgreSQL database (primary, full feature set).
MySQL
MySQL database (secondary support).
SQLite
SQLite database (local dev, testing).
SQLServer
SQL Server database (enterprise).
Implementations§
Source§impl DatabaseType
impl DatabaseType
Sourcepub const fn supports(self, feature: Feature) -> bool
pub const fn supports(self, feature: Feature) -> bool
Check whether this dialect supports feature.
All checks are const-friendly and zero-cost at runtime.
Sourcepub const fn suggestion_for(self, feature: Feature) -> Option<&'static str>
pub const fn suggestion_for(self, feature: Feature) -> Option<&'static str>
Return a human-readable migration suggestion for an unsupported feature.
None means no specific guidance is available beyond the error message.
Trait Implementations§
Source§impl Clone for DatabaseType
impl Clone for DatabaseType
Source§fn clone(&self) -> DatabaseType
fn clone(&self) -> DatabaseType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DatabaseType
impl Debug for DatabaseType
Source§impl<'de> Deserialize<'de> for DatabaseType
impl<'de> Deserialize<'de> for DatabaseType
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>,
Source§impl Display for DatabaseType
impl Display for DatabaseType
Source§impl Hash for DatabaseType
impl Hash for DatabaseType
Source§impl PartialEq for DatabaseType
impl PartialEq for DatabaseType
Source§impl Serialize for DatabaseType
impl Serialize for DatabaseType
impl Copy for DatabaseType
impl Eq for DatabaseType
impl StructuralPartialEq for DatabaseType
Auto Trait Implementations§
impl Freeze for DatabaseType
impl RefUnwindSafe for DatabaseType
impl Send for DatabaseType
impl Sync for DatabaseType
impl Unpin for DatabaseType
impl UnsafeUnpin for DatabaseType
impl UnwindSafe for DatabaseType
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
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§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<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