mool 0.2.0

A source-first Rust database toolkit for typed SQL queries, migrations, and model metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Storage modes for generated SQL enum mappings.

/// Database representation used by a [`crate::SqlEnum`] mapping.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum SqlEnumStorage {
    /// Store enum variants as text labels.
    Text,
    /// Store enum variants as explicit signed integer codes.
    Int,
    /// Store enum variants in a PostgreSQL native enum type.
    NativePostgres,
    /// Store enum variants in a MySQL native `ENUM(...)` column type.
    NativeMysql,
}