Module sea_orm::entity::prelude

source ·
Expand description

Re-export common types from the entity

Re-exports

pub use crate::error::*;

Structs

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.
ISO 8601 combined date and time without timezone.
ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
Defines a Column for an Entity
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.
ISO 8601 combined date and time without timezone.
Decimal represents a 128 bit representation of a fixed-precision decimal number. The finite set of values of type Decimal are 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.
Defines the result of a query operation on a Model
Defines a relationship
Defines a structure to perform select operations
ISO 8601 time without timezone. Allows for the nanosecond precision and optional leap second representation.
Date in the proleptic Gregorian calendar.
Combined date and time.
The clock time within a given date. Nanosecond precision.
A Universally Unique Identifier (UUID).

Enums

The type of column as defined in the SQL format
Handle a database connection depending on the backend enabled by the feature flags. This creates a database pool.
Represents any valid JSON value.
Value variants

Traits

A Rust representation of enum defined in database.
A Trait for overriding the ActiveModel behavior
A Trait for ActiveModel to perform Create, Update or Delete operation. The type must also implement the EntityTrait. See module level docs crate::entity for a full example
Wrapper of the identically named method in sea_query::Expr
A trait for any type that can be turn into a cursor
A Trait for mapping an Entity to a database table
An Entity implementing EntityTrait represents a table in a database.
Identifier
Ensure the identifier for an Entity can be converted to a static str
A Trait for links between Entities
A Trait for a Model
A Trait for any type that can paginate results
How to map a Primary Key to a column
A Trait for to be used to define a Primary Key.
Perform a FILTER opertation on a statement
Checks if Entities are related
Constraints a type to implement the trait to create a relationship

Type Definitions

Date time represented in local time
Date time represented in UTC
Date time with fixed offset
Date time represented in local time
Date time represented in UTC
Date time with fixed offset
Action to perform on a foreign key whenever there are changes to an ActiveModel

Derive Macros

A derive macro to implement sea_orm::ActiveEnum trait for enums.
The DeriveActiveModel derive macro will implement ActiveModelTrait for ActiveModel which provides setters and getters for all active values in the active model.
Models that a user can override
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 a column if column names are not in snake-case
Create an Entity
This derive macro is the ‘almighty’ macro which automatically generates Entity, Column, and PrimaryKey from a given Model.
Derive into an active 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.
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.
The DeriveRelation derive macro will implement RelationTrait for Relation.
Creates a new type that iterates of the variants of an enum.