pub struct FieldIr {
pub logical_name: String,
pub db_name: String,
pub field_type: ResolvedFieldType,
pub is_required: bool,
pub is_array: bool,
pub storage_strategy: Option<StorageStrategy>,
pub default_value: Option<DefaultValue>,
pub is_unique: bool,
pub is_updated_at: bool,
pub computed: Option<(String, ComputedKind)>,
pub check: Option<String>,
pub span: Span,
}Expand description
Validated field with resolved type.
Fields§
§logical_name: StringThe logical field name as defined in the schema (e.g., “userId”).
db_name: StringThe physical database column name (from @map or logical_name).
field_type: ResolvedFieldTypeThe resolved field type (scalar, enum, or relation).
is_required: boolWhether the field is required (not optional and not array).
is_array: boolWhether the field is an array.
storage_strategy: Option<StorageStrategy>Storage strategy for array fields (None for non-arrays or native support).
default_value: Option<DefaultValue>Default value (if specified via @default).
is_unique: boolWhether the field has @unique.
is_updated_at: boolWhether the field has @updatedAt — auto-set to now() on every write.
computed: Option<(String, ComputedKind)>Computed column expression and kind — None for regular fields.
check: Option<String>Column-level CHECK constraint expression (SQL string). None for unconstrained fields.
span: SpanSpan of the field declaration.
Trait Implementations§
impl StructuralPartialEq for FieldIr
Auto Trait Implementations§
impl Freeze for FieldIr
impl RefUnwindSafe for FieldIr
impl Send for FieldIr
impl Sync for FieldIr
impl Unpin for FieldIr
impl UnsafeUnpin for FieldIr
impl UnwindSafe for FieldIr
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