Expand description
Core of SQLx, the rust SQL toolkit.
§Note: Semver Exempt API
The API of this crate is not meant for general use and does not follow Semantic Versioning.
The only crate that follows Semantic Versioning in the project is the sqlx
crate itself.
If you are building a custom SQLx driver, you should pin an exact version for sqlx-core
to
avoid breakages:
sqlx-core = { version = "=0.6.2" }
And then make releases in lockstep with sqlx-core
. We recommend all driver crates, in-tree
or otherwise, use the same version numbers as sqlx-core
to avoid confusion.
Re-exports§
pub use error::Error;
pub use error::Result;
pub use percent_encoding;
pub use url;
pub use bytes;
Modules§
- Types and traits for passing arguments to SQL queries.
- Traits to represent a database driver.
- Provides
Decode
for decoding values from the database. - Helper module to get drivers compiling again that used to be in this crate, to avoid having to replace tons of
use crate::<...>
imports. - Provides
Encode
for encoding values for the database. - Types for working with errors produced by SQLx.
- Provides the connection pool for asynchronous SQLx connections.
- Runtime query-builder API.
- Conversions between Rust and SQL types.
Macros§
- Format an error message as a
Protocol
error
Structs§
- sqlx uses ahash for increased performance, at the cost of reduced DoS resistance. A
HashMap
usingRandomState
to hash the items. (Requires thestd
feature to be enabled.) - A hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.
- A
Vec
-like container that can store a small number of elements inline. - A parsed URL record.
Enums§
- The enum
Either
with variantsLeft
andRight
is a general purpose sum type with two cases.