Expand description
SQL serialization for Toasty.
This crate converts Toasty’s statement AST into SQL strings for SQLite, PostgreSQL, and MySQL. It also generates DDL statements for schema migrations.
Re-exports§
pub use serializer::Serializer;pub use stmt::Statement;pub use migration::*;
Modules§
- migration
- Schema migration statement generation.
- serializer
- SQL serialization and parameter handling.
- stmt
- SQL statement types for both DML and DDL operations.
- value_
json - JSON encoding for
stmt::Values stored in document-backed columns. JSON encoding forstmt::Values stored in document-backed columns (MySQLJSON, SQLite TEXT via the JSON1 extension, and eventually PostgreSQLjsonbfor#[document]-marked fields). The conversion is intentionally a plain pair of functions rather than aSerialize/Deserializeimpl onstmt::Value: the encoding is opinionated (UUIDs / decimals / timestamps as JSON strings) and matches the per-column TEXT encoding the same scalar would have at the SQL level. Backends with typed document storage (BSON, DynamoDB) need different representations.