Skip to main content

Module dialect

Module dialect 

Source
Expand description

The Dialect trait — every database backend implements this.

All methods are on &self so the same dialect object can be stored in Arc<dyn Dialect>. The trait is object-safe: no generics, no associated types.

Traits§

Dialect
A database dialect encapsulates all SQL syntax and type-mapping differences between database engines. The SDK calls dialect methods instead of hardcoding Postgres strings, so adding a new database is a matter of implementing this trait.

Functions§

escape_literal
Escape a value for inlining into a single-quoted SQL literal. Introspection queries take schema names from config, never from request input.