Skip to main content

Module model

Module model 

Source
Expand description

Model trait for ORM-style struct mapping.

The Model trait defines the contract for structs that can be mapped to database tables. It is typically derived using the #[derive(Model)] macro from sqlmodel-macros.

Structs§

AttributeChange
Describes a single attribute change detected by the change tracker.
ModelConfig
Model-level configuration matching Pydantic’s model_config.

Enums§

ExtraFieldsBehavior
Behavior for handling extra fields during validation.

Traits§

AutoIncrement
Marker trait for models that support automatic ID generation.
Model
Trait for types that can be mapped to database tables.
ModelEvents
Lifecycle event hooks for model instances.
SoftDelete
Trait for soft-deletable models.
Timestamps
Trait for models that track creation/update timestamps.