Expand description
SQL type definitions shared by the drizzle crates.
sql: compile-time SQL type markers’ capabilities (DataType,Compatible,Assignable,Numeric,Textual, …), also re-exported at the crate root.sqlite,postgres,mysql: each dialect’s type markers, column types and DDL definitions.Dialect: names a database.MigrationTracking,ConfigValue,Casing: migration settings.
§Features
std(default): standard library support.alloc:no_stdwith an allocator. Withoutstdoralloc, onlyDialectis available.serde,schemars: serialization and JSON Schema for the DDL types.uuid,chrono,geo-types,cidr,bit-vec: add the column types and Rust type mappings for those crates.timeis accepted but currently adds nothing.col16,col32,col64,col128,col200: allow row-value tuples of up to that many columns (8 by default).
Re-exports§
pub use sql::*;
Modules§
- mysql
MySQLtypes. The supported server baseline is MySQL 8.0.31.- postgres
PostgreSQLtypes.- prelude
- The dialect enum and each dialect’s column-type and category enums.
- serde_
helpers #[serde(deserialize_with = ...)]helpers forCow<'static, str>fields.- sql
- Traits that classify SQL type markers, so query builders can check operations at compile time.
- sqlite
SQLitetypes.
Structs§
- Dialect
Parse Error - Error from parsing an unknown dialect name with
str::parse. - Migration
Tracking - Where applied migrations are recorded: the tracking table and its schema.
Enums§
- Casing
- Identifier casing strategy for inferred names.
- Config
Value - A config value written inline or read from an environment variable.
- Config
Value Error - Failure resolving a
ConfigValue::Envreference. - Dialect
- A supported SQL database:
SQLite,PostgreSQLorMySQL.