pub struct ColumnDef {
pub name: String,
pub sql_type: String,
pub not_null: bool,
pub primary_key: bool,
pub unique: bool,
pub default: Option<String>,
pub auto_gen: Option<AutoGenKind>,
pub enum_name: Option<String>,
}Fields§
§name: String§sql_type: StringThe SQL type string the codegen expects
not_null: bool§primary_key: bool§unique: bool§default: Option<String>§auto_gen: Option<AutoGenKind>Auto-generation strategy (SQLite autoincrement / PostgreSQL identity).
enum_name: Option<String>For PG enum columns: the enum name
Implementations§
Source§impl ColumnDef
impl ColumnDef
pub const fn is_autoincrement(&self) -> bool
pub const fn is_identity(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ColumnDef
impl<'de> Deserialize<'de> for ColumnDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ColumnDef
impl JsonSchema for ColumnDef
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin for ColumnDef
impl UnsafeUnpin for ColumnDef
impl UnwindSafe for ColumnDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more