pub struct PropertyMeta {Show 24 fields
pub field_name: Cow<'static, str>,
pub column_name: Cow<'static, str>,
pub type_id: TypeId,
pub type_name: Cow<'static, str>,
pub is_primary_key: bool,
pub is_auto_increment: bool,
pub is_sequence: bool,
pub sequence_name: Option<Cow<'static, str>>,
pub is_required: bool,
pub is_foreign_key: bool,
pub is_concurrency_token: bool,
pub max_length: Option<usize>,
pub is_unique: bool,
pub has_index: bool,
pub is_not_mapped: bool,
pub column_type: Option<Cow<'static, str>>,
pub precision: Option<u32>,
pub scale: Option<u32>,
pub is_fixed_length: bool,
pub collation: Option<Cow<'static, str>>,
pub comment: Option<Cow<'static, str>>,
pub computed_sql: Option<Cow<'static, str>>,
pub computed_stored: bool,
pub default_value: Option<Cow<'static, str>>,
}Expand description
Metadata describing a property (column) of an entity type.
Corresponds to EFCore’s IProperty.
Fields§
§field_name: Cow<'static, str>The Rust field name.
column_name: Cow<'static, str>The database column name (may differ from field_name via #column).
type_id: TypeIdThe Rust type identifier.
type_name: Cow<'static, str>Human-readable type name for debugging.
is_primary_key: boolWhether this property is part of the primary key.
is_auto_increment: boolWhether this property is auto-increment / identity.
is_sequence: boolWhether this property is backed by a database sequence (PostgreSQL). On non-PG providers, falls back to auto_increment behavior.
sequence_name: Option<Cow<'static, str>>The sequence name when is_sequence is true (PostgreSQL only).
is_required: boolWhether this property is required (NOT NULL).
is_foreign_key: boolWhether this property is a foreign key.
is_concurrency_token: boolWhether this property is used for optimistic concurrency control.
max_length: Option<usize>Maximum length for string columns (None = unbounded).
is_unique: boolWhether this property has a unique index.
has_index: boolWhether this property has a regular index.
is_not_mapped: boolWhether this property is excluded from mapping (NotMapped).
column_type: Option<Cow<'static, str>>Explicit database column type (HasColumnType), emitted verbatim for every
dialect. Overrides the Rust-type mapping (e.g. "JSON",
"MEDIUMTEXT", "DECIMAL(12,2)").
precision: Option<u32>Numeric/decimal precision (HasPrecision(p, s)), also used as the
fractional-seconds precision for temporal types.
scale: Option<u32>Numeric/decimal scale (HasPrecision(p, s)).
is_fixed_length: boolWhether string columns use a fixed-length type (CHAR(n)).
collation: Option<Cow<'static, str>>Column-level collation (HasCollation).
comment: Option<Cow<'static, str>>Column/table comment (HasComment).
computed_sql: Option<Cow<'static, str>>Generated/computed column expression (HasComputedColumnSql).
computed_stored: boolWhether a computed column is persisted (STORED) or virtual.
default_value: Option<Cow<'static, str>>Raw SQL DEFAULT expression (HasDefaultValue / HasDefaultValueSql).
Implementations§
Source§impl PropertyMeta
impl PropertyMeta
Sourcepub fn is_computed(&self) -> bool
pub fn is_computed(&self) -> bool
Returns true for generated/computed columns (excluded from
INSERT/UPDATE and column defaults).