Crate sea_orm_macros

Crate sea_orm_macros 

Macros§

raw_sql

Attribute Macros§

sea_orm_compact_model
sea_orm_model

Derive Macros§

DeriveActiveEnum
A derive macro to implement sea_orm::ActiveEnum trait for enums.
DeriveActiveModel
The DeriveActiveModel derive macro will implement ActiveModelTrait for ActiveModel which provides setters and getters for all active values in the active model.
DeriveActiveModelBehavior
Models that a user can override
DeriveActiveModelEx
Derive a complex active model with relational fields
DeriveColumn
The DeriveColumn derive macro will implement [ColumnTrait] for Columns. It defines the identifier of each column by implementing Iden and IdenStatic. The EnumIter is also derived, allowing iteration over all enum variants.
DeriveDisplay
DeriveEntity
Create an Entity
DeriveEntityModel
This derive macro is the ‘almighty’ macro which automatically generates Entity, Column, and PrimaryKey from a given Model.
DeriveIden
The DeriveIden derive macro will implement sea_orm::Iden for simplify Iden implementation.
DeriveIntoActiveModel
Derive into an active model
DeriveMigrationName
The DeriveMigrationName derive macro will implement sea_orm_migration::MigrationName for a migration.
DeriveModel
The DeriveModel derive macro will implement ModelTrait for Model, which provides setters and getters for all attributes in the mod It also implements FromQueryResult to convert a query result into the corresponding Model.
DeriveModelEx
Derive a complex model with relational fields
DerivePartialModel
The DerivePartialModel derive macro will implement [sea_orm::PartialModelTrait] for simplify partial model queries. Since 2.0, this macro cannot be used with the FromQueryResult macro.
DerivePrimaryKey
The DerivePrimaryKey derive macro will implement [PrimaryKeyToColumn] for PrimaryKey which defines tedious mappings between primary keys and columns. The EnumIter is also derived, allowing iteration over all enum variants.
DeriveRelatedEntity
The DeriveRelatedEntity derive macro will implement seaography::RelationBuilder for RelatedEntity enumeration.
DeriveRelation
The DeriveRelation derive macro will implement RelationTrait for Relation.
DeriveValueType
Implements traits for types that wrap a database value type.
EnumIter
Creates a new type that iterates of the variants of an enum.
FromJsonQueryResult
FromQueryResult
Convert a query result into the corresponding Model.