Crate sqlx_oldapi

Source

Modules§

any
Generic database driver with the specific driver selected at runtime.
database
Traits to represent a database driver.
decode
Provides Decode for decoding values from the database.
encode
Provides Encode for encoding values for the database.
error
Types for working with errors produced by SQLx.
migrate
mssqlmssql
Microsoft SQL (MSSQL) database driver.
mysqlmysql
MySQL database driver.
pool
Provides the connection pool for asynchronous SQLx connections.
postgrespostgres
PostgreSQL database driver.
prelude
Convenience re-export of common traits.
query
Types and traits for the query family of functions and macros.
query_builder
Runtime query-builder API.
sqlitesqlite
SQLite database driver.
types
Conversions between Rust and SQL types.

Macros§

migrate
Embeds migrations into the binary by expanding to a static instance of Migrator.
querymacros
Statically checked SQL query with println!() style syntax.
query_asmacros
A variant of [query!] which takes a path to an explicitly defined struct as the output type.
query_as_uncheckedmacros
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.
query_filemacros
A variant of [query!] where the SQL query is stored in a separate file.
query_file_asmacros
Combines the syntaxes of [query_as!] and [query_file!].
query_file_as_uncheckedmacros
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.
query_file_scalarmacros
A variant of query_scalar! which takes a file path like [query_file!].
query_file_scalar_uncheckedmacros
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.
query_file_uncheckedmacros
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.
query_scalarmacros
A variant of [query!] which expects a single column from the query and evaluates to an instance of QueryScalar.
query_scalar_uncheckedmacros
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.
query_uncheckedmacros
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§

Any
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 url.
AnyConnection
A connection to any SQLx database.
Mssqlmssql
MSSQL database driver.
MssqlConnectionmssql
MySqlmysql
MySQL database driver.
MySqlConnectionmysql
A connection to a MySQL database.
PgConnectionpostgres
A connection to a PostgreSQL database.
Pool
An asynchronous pool of SQLx database connections.
Postgrespostgres
PostgreSQL database driver.
QueryBuilder
A builder type for constructing queries at runtime.
Sqlitesqlite
Sqlite database driver.
SqliteConnectionsqlite
A connection to an open Sqlite database.
Transaction
An in-progress database transaction or savepoint.

Enums§

Either
The enum Either with variants Left and Right is a general purpose sum type with two cases.
Error
Represents all the ways a method can fail within SQLx.

Traits§

Acquire
Acquire connections or transactions from a database in a generic way.
AnyExecutor
An alias for Executor<'_, Database = Any>.
Arguments
A tuple of arguments to be sent to the database.
Column
ColumnIndex
A type that can be used to index into a Row or Statement.
ConnectOptions
Connection
Represents a single database connection.
Database
A database driver.
Decode
A type that can be decoded from the database.
Encode
Encode a single value to be sent to the database.
Execute
A type that may be executed against a database connection.
Executor
A type that contains or can provide a database connection to use for executing queries against the database.
FromRow
A record that can be built from a row returned by the database.
IntoArguments
MssqlExecutormssql
An alias for Executor<'_, Database = Mssql>.
MySqlExecutormysql
An alias for Executor<'_, Database = MySql>.
PgExecutorpostgres
An alias for Executor<'_, Database = Postgres>.
Row
Represents a single row from the database.
SqliteExecutorsqlite
An alias for Executor<'_, Database = Sqlite>.
Statement
An explicitly prepared statement.
Type
Indicates that a SQL type is supported for a database.
TypeInfo
Provides information about a SQL type for the database driver.
Value
An owned value from the database.
ValueRef
A reference to a single value from the database.

Functions§

query
Make a SQL query.
query_as
Make a SQL query that is mapped to a concrete type using FromRow.
query_as_with
Make a SQL query, with the given arguments, that is mapped to a concrete type using FromRow.
query_scalar
Make a SQL query that is mapped to a single concrete type using FromRow.
query_scalar_with
Make a SQL query, with the given arguments, that is mapped to a single concrete type using FromRow.
query_with
Make a SQL query, with the given arguments.

Type Aliases§

AnyPool
MssqlPoolmssql
An alias for Pool, specialized for MSSQL.
MySqlPoolmysql
An alias for Pool, specialized for MySQL.
PgPoolpostgres
An alias for Pool, specialized for Postgres.
Result
A specialized Result type for SQLx.
SqlitePoolsqlite
An alias for Pool, specialized for SQLite.

Attribute Macros§

test
Mark an async fn as a test with SQLx support.

Derive Macros§

Decode
Encode