Module prelude
Expand description
Re-export common types from the entity
Re-exports§
pub use crate::ActiveEnum;pub use crate::ActiveModelBehavior;pub use crate::ActiveModelTrait;pub use crate::ColumnDef;pub use crate::ColumnTrait;pub use crate::ColumnTypeTrait;pub use crate::ConnectionTrait;pub use crate::CursorTrait;pub use crate::DatabaseConnection;pub use crate::DbConn;pub use crate::EntityName;pub use crate::EntityTrait;pub use crate::ForeignKeyAction;pub use crate::IdenStatic;pub use crate::Linked;pub use crate::LoaderTrait;pub use crate::ModelTrait;pub use crate::PaginatorTrait;pub use crate::PrimaryKeyArity;pub use crate::PrimaryKeyToColumn;pub use crate::PrimaryKeyTrait;pub use crate::QueryFilter;pub use crate::QueryResult;pub use crate::Related;pub use crate::RelatedSelfVia;pub use crate::RelationDef;pub use crate::RelationTrait;pub use crate::Select;pub use crate::SelectExt;pub use super::compound::HasMany;pub use super::compound::HasOne;pub use crate::value::ChronoUnixTimestamp;pub use crate::value::ChronoUnixTimestampMillis;pub use crate::value::TimeUnixTimestamp;pub use crate::value::TimeUnixTimestampMillis;pub use crate::value::TextUuid;pub use async_trait;pub use crate::error::*;
Structs§
- Chrono
Date - ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
- Chrono
Date Time - ISO 8601 combined date and time without timezone.
- Chrono
Time - ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
- Date
- ISO 8601 calendar date without timezone. Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE. Also supports the conversion from ISO 8601 ordinal and week date.
- Date
Time - ISO 8601 combined date and time without timezone.
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.- DynIden
- A prepared (quoted) identifier string.
- SeaRc
- A legacy namespace for compatibility.
- Time
- ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
- Time
Date - Date in the proleptic Gregorian calendar.
- Time
Date Time - Combined date and time.
- Time
Date Time With Time Zone - A
PrimitiveDateTimewith aUtcOffset. - Time
Time - The clock time within a given date. Nanosecond precision.
- Uuid
- A Universally Unique Identifier (UUID).
Enums§
- Column
Type - All column types
- Expr
- An arbitrary, dynamically-typed SQL expression.
- HasMany
Model - Container for 1-N or M-N related Models
- HasOne
Model - Container for belongs_to or has_one relation
- Json
- Represents any valid JSON value.
- String
Len - Length for var-char/binary; default to 255 in MySQL if length is not specified
- Value
- Value variants
Traits§
- Iden
- Identifier
Type Aliases§
- Chrono
Date Time Local - Date time represented in local time
- Chrono
Date Time Utc - Date time represented in UTC
- Chrono
Date Time With Time Zone - Date time with fixed offset
- Chrono
Utc - The UTC type from chrono
- Date
Time Local - Date time represented in local time
- Date
Time Utc - Date time represented in UTC
- Date
Time With Time Zone - Date time with fixed offset
- RcOrArc
- A reference counted pointer: either
RcorArc, depending on the feature flags.
Derive Macros§
- Derive
Active Enum - A derive macro to implement
sea_orm::ActiveEnumtrait for enums. - Derive
Active Model - The DeriveActiveModel derive macro will implement ActiveModelTrait for ActiveModel which provides setters and getters for all active values in the active model.
- Derive
Active Model Behavior - Models that a user can override
- Derive
Active Model Ex - Derive a complex active model with relational fields
- Derive
Column - 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.
- Derive
Display - Derive
Entity - Create an Entity
- Derive
Entity Model - This derive macro is the ‘almighty’ macro which automatically generates Entity, Column, and PrimaryKey from a given Model.
- Derive
Iden - The DeriveIden derive macro will implement
sea_orm::Idenfor simplify Iden implementation. - Derive
Into Active Model - Derive into an active model
- Derive
Model - 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.
- Derive
Model Ex - Derive a complex model with relational fields
- Derive
Partial Model - The DerivePartialModel derive macro will implement [
sea_orm::PartialModelTrait] for simplify partial model queries. Since 2.0, this macro cannot be used with theFromQueryResultmacro. - Derive
Primary Key - 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.
- Derive
Related Entity - The DeriveRelatedEntity derive macro will implement seaography::RelationBuilder for RelatedEntity enumeration.
- Derive
Relation - The DeriveRelation derive macro will implement RelationTrait for Relation.
- Derive
Value Type - Implements traits for types that wrap a database value type.
- Enum
Iter - Creates a new type that iterates of the variants of an enum.
- From
Json Query Result