[][src]Crate sqlx

Modules

arguments

Traits for passing arguments to SQL queries.

database
decode
describe

Types for returning SQL type information about queries.

encode
error

Error and Result types.

mysqlfeature="mysql"

MySQL database and connection types.

pool

Pool for SQLx database connections.

postgresfeature="postgres"

Postgres database and connection types.

prelude
query
row

Contains the Row and FromRow traits.

types

Traits linking Rust types to SQL types.

Macros

queryfeature="macros"

Statically checked SQL query with println!() style syntax.

query_asfeature="macros"

A variant of query! which takes a path to an explicitly defined struct as the output type.

query_filefeature="macros"

A variant of query! where the SQL query is stored in a separate file.

query_file_asfeature="macros"

Combines the syntaxes of query_as! and query_file!.

Structs

MySqlfeature="mysql"

MySQL database driver.

MySqlConnectionfeature="mysql"

An asynchronous connection to a MySql database.

PgConnectionfeature="postgres"

An asynchronous connection to a [Postgres][super::Postgres] database.

Pool

A pool of database connections.

Postgresfeature="postgres"

Postgres database driver.

Query

Raw SQL query with bind parameters. Returned by query.

QueryAs

Raw SQL query with bind parameters, mapped to a concrete type using FromRow. Returned by query_as.

Transaction

Enums

Error

A generic error that represents all the ways a method can fail inside of SQLx.

Traits

Connect

Represents a type that can directly establish a new connection.

Connection

Represents a single database connection rather than a pool of database connections.

Cursor

Represents a result set, which is generated by executing a query against the database.

Database

A database driver.

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 from by the database.

RefExecutor
Row

Represents a single row of the result set.

Type

Indicates that a SQL type is supported for a database.

Functions

query

Construct a raw SQL query that can be chained to bind parameters and executed.

query_as

Construct a raw SQL query that is mapped to a concrete type using FromRow.

Type Definitions

MySqlPoolfeature="mysql"

An alias for Pool, specialized for MySQL.

PgPoolfeature="postgres"

An alias for Pool, specialized for Postgres.

Result

A specialized Result type for SQLx.

Derive Macros

Type