Modules§
Macros§
- Statically checked SQL query with
println!()
style syntax. - A variant of
query!
which takes a path to an explicitly defined struct as the output type.
Structs§
- An asynchronous pool of SQLx database connections.
- Configuration options for
Pool
.
Enums§
- Represents all the ways a method can fail within SQLx.
Traits§
- Acquire connections or transactions from a database in a generic way.
- A tuple of arguments to be sent to the database.
- Represents a single database connection.
- A database driver.
- A type that can be decoded from the database.
- Encode a single value to be sent to the database.
- A type that contains or can provide a database connection to use for executing queries against the database.
- A record that can be built from a row returned by the database.
- A struct that is
Insert
is expected to have same fields as the model, excluding fields that have sane defaults at the database level. Concretely, if you have a Person struct: #[derive(ormlite::Model)] struct Person { id: i32, name: String, age: i32, } - The core trait. a struct that implements
Model
can also implementHasModelBuilder
, (and is required to implementInsertable
) - Represents a single row from the database.
Functions§
- Execute a single SQL query as a prepared statement (transparently cached).
- Execute a single SQL query as a prepared statement (transparently cached). Maps rows to Rust types using
FromRow
. - Execute a single SQL query, with the given arguments as a prepared statement (transparently cached). Maps rows to Rust types using
FromRow
. - Execute a SQL query as a prepared statement (transparently cached), with the given arguments.
Type Aliases§
- An owned dynamically typed
Future
for use in cases where you can’t statically type your result or need to add some indirection.
Derive Macros§
- Derive macro for
#[derive(Model)]
It additionally generates FromRow for the struct, since Model requires FromRow.