Skip to main content

Crate cratestack_sql

Crate cratestack_sql 

Source
Expand description

Dialect-agnostic SQL primitives shared by the Postgres (cratestack-sqlx) and SQLite (cratestack-rusqlite) backends.

This crate carries the type definitions every backend agrees on:

Rendering SQL strings, executing queries, and any DB-driver coupling live in the backend crates.

Structs§

CreateDefault
FieldRef
Filter
ModelColumn
ModelDescriptor
OrderClause
PostgresDialect
Postgres dialect — $N placeholders.
RelationFilter
SqlColumnValue
SqliteDialect
SQLite dialect — ?N placeholders.

Enums§

CreateDefaultType
FilterExpr
FilterOp
FilterValue
OrderTarget
RelationQuantifier
SortDirection
SqlValue

Traits§

CreateModelInput
Dialect
Backend SQL dialect.
IntoSqlValue
UpdateModelInput
UpsertModelInput
Input shape for the upsert primitive — INSERT … ON CONFLICT (<pk>) DO UPDATE …. sql_values() must include the primary-key column (so the backend can target the conflict), and primary_key_value() exposes the PK separately so the runtime can issue a SELECT … FOR UPDATE before the upsert to drive Created vs. Updated event / audit semantics.