Crate caretta_framework_migration

Crate caretta_framework_migration 

Source

Modules§

async_trait
githubcrates-iodocs-rs
cli
m20220101_000001_create_table
sea_orm

Macros§

all
Macro to easily create an Condition::all.
any
Macro to easily create an Condition::any.
raw_query
raw_sql

Structs§

AddColumnOption
table alter add column options
Alias
An explicit wrapper for Idens which are dynamic user-provided strings.
Asterisk
Asterisk (“*”)
CaseStatement
Check
ColumnDef
Specification of a table column
ColumnName
A column name, potentially qualified as (database.)(schema.)(table.)column.
ColumnSpec
CommonTableExpression
A table definition inside a WITH clause (WithClause).
Condition
Represents the value of an Condition::any or Condition::all: a set of disjunctive or conjunctive conditions.
ConditionHolder
Cycle
For recursive WithQuery WithClauses the CYCLE sql clause can be specified to avoid creating an infinite traversals that loops on graph cycles indefinitely.
DatabaseName
An identifier that represents a database name.
DeleteStatement
Delete existing rows from the table
DropColumnOption
table alter drop column options
DynIden
A prepared (quoted) identifier string.
ForeignKey
Shorthand for constructing any foreign key statement
ForeignKeyCreateStatement
Create a foreign key constraint for an existing table. Unsupported by Sqlite
ForeignKeyDropStatement
Drop a foreign key constraint for an existing table
FrameClause
Frame clause
FuncArgMod
FunctionCall
Function call.
Generated
Index
Shorthand for constructing any index statement
IndexColumnExpr
IndexColumnTableColumn
IndexCreateStatement
Create an index for an existing table
IndexDropStatement
Drop an index for an existing table
InsertStatement
Insert any new rows into an existing table
JoinExpr
Join expression used in select statement
LikeExpr
Like Expression
LockClause
Migrator
MysqlQueryBuilder
Mysql query builder.
NullAlias
Null Alias
OnConflict
OrderExpr
Order expression
PostgresQueryBuilder
Postgres query builder.
Query
Shorthand for constructing any table query
Quote
Returning
Shorthand for constructing ReturningClause
SchemaManager
Helper struct for writing migration scripts in migration file
SchemaName
A schema name, potentially qualified as (database.)schema.
SeaRc
A legacy namespace for compatibility.
Search
For recursive WithQuery WithClauses the traversing order can be specified in some databases that support this functionality.
SelectExpr
Select expression used in select statement
SelectStatement
Select rows from an existing table
SqlWriterValues
SqliteQueryBuilder
Sqlite query builder.
Table
Helper for constructing any table statement
TableAlterStatement
Alter a table
TableCreateStatement
Create a table
TableDropStatement
Drop a table
TableForeignKey
Specification of a foreign key
TableIndex
Specification of a table index
TableName
A table name, potentially qualified as (database.)(schema.)table.
TableRenameStatement
Rename a table
TableTruncateStatement
Drop a table
Tokenizer
Tokenizer for processing SQL.
TypeRef
An SQL type name, potentially qualified as (database.)(schema.)type.
UpdateStatement
Update existing rows in the table
ValueTupleIter
ValueTypeErr
Values
WindowStatement
Window expression
WithClause
A WITH clause can contain one or multiple common table expressions (CommonTableExpression).
WithQuery
A WITH query. A simple SQL query that has a WITH clause (WithClause).

Enums§

ArrayType
Value types variant for Postgres array
BinOper
Binary operators.
ColumnRef
Column references.
ColumnType
All column types
ConditionHolderContents
ConditionType
DbErr
An error from unsuccessful database operations
Expr
An arbitrary, dynamically-typed SQL expression.
ForeignKeyAction
Foreign key on update & on delete actions
ForeignKeyStatement
All available types of foreign key statement
Frame
frame_start or frame_end clause
FrameType
Frame type
Func
Known SQL functions.
IndexColumn
IndexOrder
IndexStatement
All available types of index statement
IndexType
Specification of a table index
JoinOn
Join on types
JoinType
Join types
Keyword
Known SQL keywords that can be used as expressions.
LockBehavior
List of lock behavior can be used in select statement
LockType
List of lock types that can be used in select statement
LogicalChainOper
Logical chain operator: conjunction or disjunction.
Mode
NullOrdering
Nulls order
OnConflictAction
Represents ON CONFLICT (upsert) actions
OnConflictTarget
Represents ON CONFLICT (upsert) targets
OnConflictUpdate
Represents strategies to update column in ON CONFLICT (upsert) actions
Oper
Order
Ordering options
PgDateTruncUnit
PgFunc
Known Postgres-specific functions.
PgInterval
QueryStatement
All available types of table query
ReturningClause
RETURNING clause.
SchemaManagerConnection
SchemaStatement
SearchOrder
For recursive WithQuery WithClauses the traversing order can be specified in some databases that support this functionality.
SelectDistinct
List of distinct keywords that can be used in select statement
StringLen
Length for var-char/binary; default to 255
SubQueryOper
SubQuery operators
SubQueryStatement
TableAlterOption
All available table alter options
TableDropOpt
All available table drop options
TableOpt
All available table options
TablePartition
All available table partition options
TableRef
Table references
TableStatement
All available types of table statement
Token
UnOper
Unary operators.
UnionType
List of union types that can be used in union clause
Value
Value variants
ValueTuple
WindowSelectType
Window type in SelectExpr

Constants§

VALUE_SIZE
This test is to check if the size of Value exceeds the limit.

Traits§

ConditionalStatement
ConnectionTrait
The generic API for a database connection that can perform query or execute statements. It abstracts database connection and transaction
DateLikeValue
DateLikeValueNullable
DateTimeLikeValue
DateTimeLikeValueNullable
EscapeBuilder
ExprTrait
“Operator” methods for building expressions.
ForeignKeyBuilder
FromValueTuple
GenericBuilder
Iden
Identifier
IdenList
IdenStatic
Identifier statically known at compile-time.
IndexBuilder
IntoColumnDef
IntoColumnRef
IntoCondition
A helper trait.
IntoIden
IntoIndexColumn
IntoLikeExpr
IntoSchemaManagerConnection
IntoTableRef
IntoTypeRef
IntoValueTuple
MaybeQualifiedOnce
A name that can be unqualified (foo) or qualified once (foo.bar).
MaybeQualifiedTwice
A name that can be unqualified (foo), qualified once (foo.bar), or twice (foo.bar.baz).
MigrationName
MigrationTrait
The migration definition
MigratorTrait
Performing migrations on a database
Nullable
NumericValue
NumericValueNullable
OperLeftAssocDecider
OrderedStatement
OverStatement
PrecedenceDecider
QueryBuilder
QueryStatementBuilder
QueryStatementWriter
QuotedBuilder
SchemaBuilder
SchemaStatementBuilder
SqlWriter
TableBuilder
TableRefBuilder
TimeLikeValue
TimeLikeValueNullable
ValueType
Write
A trait for writing or formatting into Unicode-accepting buffers or streams.

Functions§

inject_parameters
is_static_iden
Return whether this identifier needs to be escaped. Right now we’re very safe and only return true for identifiers composed of a-zA-Z0-9_.
sea_value_to_json_value
Convert value to json value

Type Aliases§

Cond
FunctionDeprecated
Type alias of Func for compatibility. Previously, Func is a namespace for building FunctionCall.
MySqlQueryBuilder
RcOrArc
A reference counted pointer: either Rc or Arc, depending on the feature flags.
SimpleExpr
A legacy compatibility alias for Expr.

Attribute Macros§

enum_def

Derive Macros§

DeriveIden
The DeriveIden derive macro will implement sea_orm::Iden for simplify Iden implementation.
DeriveMigrationName
The DeriveMigrationName derive macro will implement sea_orm_migration::MigrationName for a migration.
Iden
IdenStatic