[−][src]Crate sqlx
Modules
any | Generic database driver with the specific driver selected at runtime. |
database | Traits to represent a database driver. |
decode | Provides |
encode | Provides |
error | Types for working with errors produced by SQLx. |
migrate | |
mssql | mssql Microsoft SQL (MSSQL) database driver. |
mysql | mysql MySQL database driver. |
pool | Provides the connection pool for asynchronous SQLx connections. |
postgres | postgres PostgreSQL database driver. |
prelude | Convenience re-export of common traits. |
query | Types and traits for the |
sqlite | sqlite 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. |
query | macros Statically checked SQL query with |
query_as | macros A variant of query! which takes a path to an explicitly defined struct as the output type. |
query_as_unchecked | 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. |
query_file | macros A variant of query! where the SQL query is stored in a separate file. |
query_file_as | macros Combines the syntaxes of query_as! and query_file!. |
query_file_as_unchecked | 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. |
query_file_unchecked | 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. |
query_unchecked | 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
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 uri. |
AnyConnection | A connection to any SQLx database. |
Mssql | mssql MSSQL database driver. |
MssqlConnection | mssql |
MySql | mysql MySQL database driver. |
MySqlConnection | mysql A connection to a MySQL database. |
PgConnection | postgres A connection to a PostgreSQL database. |
Pool | An asynchronous pool of SQLx database connections. |
Postgres | postgres PostgreSQL database driver. |
Sqlite | sqlite Sqlite database driver. |
SqliteConnection | sqlite A connection to a Sqlite database. |
Transaction | An in-progress database transaction or savepoint. |
Enums
Error | Represents all the ways a method can fail within SQLx. |
Traits
Acquire | |
Arguments | A tuple of arguments to be sent to the database. |
Column | |
ColumnIndex | |
ConnectOptions | |
Connection | Represents a single database connection. |
Database | A database driver. |
Decode | A type that can be decoded from the database. |
Done | |
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 | |
Row | Represents a single row from the database. |
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 |
query_as_with | Make a SQL query, with the given arguments, that is mapped to a concrete type
using |
query_scalar | Make a SQL query that is mapped to a single concrete type
using |
query_scalar_with | Make a SQL query, with the given arguments, that is mapped to a single concrete type
using |
query_with | Make a SQL query, with the given arguments. |
Type Definitions
AnyPool | |
MssqlPool | mssql An alias for |
MySqlPool | mysql An alias for |
PgPool | postgres An alias for |
Result | A specialized |
SqlitePool | sqlite An alias for |
Derive Macros
Decode | |
Encode |