Crate sqlx[−][src]
Modules
Generic database driver with the specific driver selected at runtime.
Traits to represent a database driver.
Provides Decode
for decoding values from the database.
Provides Encode
for encoding values for the database.
Types for working with errors produced by SQLx.
mssql
Microsoft SQL (MSSQL) database driver.
mysql
MySQL database driver.
Provides the connection pool for asynchronous SQLx connections.
postgres
PostgreSQL database driver.
Convenience re-export of common traits.
Types and traits for the query
family of functions and macros.
sqlite
SQLite database driver.
Conversions between Rust and SQL types.
Macros
Embeds migrations into the binary by expanding to a static instance of Migrator.
macros
Statically checked SQL query with println!()
style syntax.
macros
A variant of query! which takes a path to an explicitly defined struct as the output type.
macros
A variant of query_as! which does not check the input or output types. This still does parse the query to ensure it’s syntactically and semantically valid for the current database.
macros
A variant of query! where the SQL query is stored in a separate file.
macros
Combines the syntaxes of query_as! and query_file!.
macros
A variant of query_file_as! which does not check the input or output types. This still does parse the query to ensure it’s syntactically and semantically valid for the current database.
macros
A variant of query_scalar! which takes a file path like query_file!.
A variant of query_file_scalar! which does not typecheck bind parameters and leaves the output type to inference. The query itself is still checked that it is syntactically and semantically valid for the database, that it only produces one column and that the number of bind parameters is correct.
macros
A variant of query_file! which does not check the input or output types. This still does parse the query to ensure it’s syntactically and semantically valid for the current database.
macros
A variant of query! which expects a single column from the query and evaluates to an instance of QueryScalar.
macros
A variant of query_scalar! which does not typecheck bind parameters and leaves the output type to inference. The query itself is still checked that it is syntactically and semantically valid for the database, that it only produces one column and that the number of bind parameters is correct.
macros
A variant of query! which does not check the input or output types. This still does parse the query to ensure it’s syntactically and semantically valid for the current database.
Structs
Opaque database driver. Capable of being used in place of any SQLx database driver. The actual driver used will be selected at runtime, from the connection uri.
A connection to any SQLx database.
mssql
MSSQL database driver.
mssql
mysql
MySQL database driver.
mysql
A connection to a MySQL database.
postgres
A connection to a PostgreSQL database.
An asynchronous pool of SQLx database connections.
postgres
PostgreSQL database driver.
sqlite
Sqlite database driver.
sqlite
A connection to a Sqlite database.
An in-progress database transaction or savepoint.
Enums
Represents all the ways a method can fail within SQLx.
Traits
An alias for Executor<'_, Database = Any>
.
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 may be executed against a database connection.
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.
mssql
An alias for Executor<'_, Database = Mssql>
.
mysql
An alias for Executor<'_, Database = MySql>
.
postgres
An alias for Executor<'_, Database = Postgres>
.
Represents a single row from the database.
sqlite
An alias for Executor<'_, Database = Sqlite>
.
An explicitly prepared statement.
Indicates that a SQL type is supported for a database.
Provides information about a SQL type for the database driver.
An owned value from the database.
A reference to a single value from the database.
Functions
Make a SQL query.
Make a SQL query that is mapped to a concrete type
using FromRow
.
Make a SQL query, with the given arguments, that is mapped to a concrete type
using FromRow
.
Make a SQL query that is mapped to a single concrete type
using FromRow
.
Make a SQL query, with the given arguments, that is mapped to a single concrete type
using FromRow
.
Make a SQL query, with the given arguments.
Type Definitions
mssql
An alias for Pool
, specialized for MSSQL.
mysql
An alias for Pool
, specialized for MySQL.
postgres
An alias for Pool
, specialized for Postgres.
A specialized Result
type for SQLx.
sqlite
An alias for Pool
, specialized for SQLite.