Skip to main content

Module capabilities

Module capabilities 

Source
Expand description

Engine capability marker traits.

Each trait in this module marks a capability that some QueryEngine impls satisfy and others don’t. The macro DSL (phase 3+) and the generated input types (phase 2) carry where E: SupportsX bounds on the methods that produce capability-dependent SQL. Using such a method against an engine that doesn’t impl the trait fails to compile with a clear diagnostic.

Engine crates (prax-postgres, prax-mysql, …) impl the traits they satisfy on their concrete engine types. Phase 1 only defines the traits; engine impls land in phase 2.

Traits§

SupportsArrayOps
Engine supports native array column operators (contains, overlaps, …).
SupportsCaseInsensitiveMode
Engine has native case-insensitive comparison (ILIKE, COLLATE NOCASE, equivalent). Engines without it fall back to LOWER(...) comparisons and do not need to impl this trait.
SupportsCorrelatedSubquery
Engine supports correlated subqueries in WHERE clauses.
SupportsFullTextSearch
Engine supports full-text search predicates.
SupportsGeneratedColumns
Engine supports DDL for GENERATED ALWAYS AS (expr) STORED|VIRTUAL computed columns.
SupportsJsonPath
Engine supports JSON-path filter operators (path_eq, path_gt, etc.).
SupportsNestedWrites
Engine supports Prisma-style nested writes (create / connect / connect_or_create / disconnect / set / update / upsert / delete / delete_many inside data).
SupportsRelationFilter
Engine supports relation filters (some/every/none/is/is_not) that lower to correlated EXISTS / NOT EXISTS subqueries (or the equivalent in non-SQL engines).
SupportsScalarSubqueryInSelect
Engine supports scalar subqueries in the SELECT list.