Expand description
Prelude module for convenient imports.
ⓘ
use sqlmodel::prelude::*;Re-exports§
pub use crate::ConnectionSession;pub use crate::ConnectionSessionBuilder;
Modules§
- select
- SELECT query builder.
Macros§
- delete
- Create a DELETE query for a model.
- insert
- Create an INSERT query for a model.
- select
- Create a SELECT query for a model.
- update
- Create an UPDATE query for a model.
Structs§
- Budget
- A budget constraining resource usage for a task or region.
- Cx
- The capability context for a task.
- Dump
Options - Options for model_dump() and model_dump_json().
- Fields
Set - A compact bitset representing “field is set” for indices
0..len. - GetOptions
- Options for
Session::get_with_options(). - Hybrid
- A hybrid property wrapper.
- Join
- A JOIN clause.
- Migration
- A database migration.
- Migration
Runner - Migration runner for executing migrations.
- Object
Key - Unique key for an object in the identity map.
- OrderBy
- ORDER BY clause.
- Polymorphic
Joined Select - A polymorphic SELECT for joined-table inheritance base + single child.
- Polymorphic
Joined Select2 - A polymorphic SELECT for joined-table inheritance base + two children.
- Polymorphic
Joined Select3 - A polymorphic SELECT for joined-table inheritance base + three children.
- Pool
- A connection pool for database connections.
- Pool
Config - Connection pool configuration.
- Region
Id - A unique identifier for a region in the runtime.
- Row
- A single row returned from a database query.
- Select
- A SELECT query builder.
- Session
- The Session is the central unit-of-work manager.
- Session
Config - Configuration for Session behavior.
- TaskId
- A unique identifier for a task in the runtime.
- Tracked
Model - A model instance with explicit “fields set” tracking.
- Validate
Options - Options for model_validate().
Enums§
- Dump
Mode - Output mode for model_dump().
- Error
- The primary error type for all SQLModel operations.
- Expr
- A SQL expression that can be used in WHERE, HAVING, etc.
- Join
Type - Types of SQL joins.
- Object
State - State of a tracked object in the session.
- Outcome
- The four-valued outcome of a concurrent operation.
- Polymorphic
Joined - Output of a joined-table inheritance polymorphic query with a single child type.
- Polymorphic
Joined2 - Output of a joined-table inheritance polymorphic query with two child types.
- Polymorphic
Joined3 - Output of a joined-table inheritance polymorphic query with three child types.
- Validate
Input - Input types for model_validate().
- Value
- A dynamically-typed SQL value.
Traits§
- Connection
- Model
- Trait for types that can be mapped to database tables.
- Model
Dump - Trait for models that support model_dump().
- SqlModel
Dump - Model-aware dump that supports field aliases and computed field exclusion.
- SqlModel
Validate - Model-aware validation that supports field aliases.
Functions§
- create_
table - Create a table for a model type.
Type Aliases§
- Result
- Result type alias for SQLModel operations.
- Validate
Result - Result type for model_validate operations.