mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-21 00:54:19 +01:00
closes https://github.com/tursodatabase/turso/issues/3773 ## Before ```rust #[derive(Debug, Clone)] pub struct Column { pub name: Option<String>, pub ty: Type, // many sqlite operations like table_info retain the original string pub ty_str: String, pub primary_key: bool, pub is_rowid_alias: bool, pub notnull: bool, pub default: Option<Box<Expr>>, pub unique: bool, pub collation: Option<CollationSeq>, pub hidden: bool, } ``` obviously not ideal. so lets pack `type`, `hidden`, `primary_key`, `is_rowid_alias`, `notnull` and `collation` into a u16. ## After: ```rust #[derive(Debug, Clone)] pub struct Column { pub name: Option<String>, pub ty_str: String, pub default: Option<Box<Expr>>, raw: u16, } ``` Also saw a place to replace a `Mutex<Enum>` with `AtomicEnum`, so I snuck that in here too Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com> Closes #3905