Skip to main content

Module capability

Module capability 

Source
Expand description

Dialect capability matrix and fail-fast guard.

DialectCapabilityGuard is called at query-planning time to verify that the requested feature is supported by the connected database dialect. If not, it returns FraiseQLError::Unsupported with a human-readable message and an optional migration suggestion — before SQL generation begins.

This prevents cryptic driver errors (“syntax error near ‘RETURNING’”) and replaces them with actionable developer guidance.

§Usage

DialectCapabilityGuard::check(DatabaseType::SQLite, Feature::Mutations)?;
// → Err(FraiseQLError::Unsupported { message: "Mutations (INSERT/UPDATE/DELETE
//     via mutation_response) are not supported on SQLite. Use PostgreSQL or
//     MySQL for mutation support." })

Structs§

DialectCapabilityGuard
Fail-fast guard that checks database dialect capabilities before SQL generation.

Enums§

Feature
A database feature that may not be supported on all dialects.