Expand description
Helper types and functions for auto-generateed psql database wrappers
Provides the TryFromRow trait which converts from a tokio_postgres::Row. Implementations are provided for common types
Reexports tokio_postgres::Error as SqlError (the Result::Err of the return from TryFromRow::from_row) and tokio_postgres::Row
Re-exports§
pub use postgres;pub use tokio_postgres;pub use bit_vec;pub use chrono;pub use geo_types;pub use rust_decimal;pub use serde_json;pub use uuid;
Structs§
- Async
Client - An asynchronous PostgreSQL client.
- Row
- A row of data returned from the database by a query.
- SqlError
- An error communicating with the Postgres server.
- Sync
Client - A synchronous PostgreSQL client.
Traits§
- FromSql
- A trait for types that can be created from a Postgres value.
- ToSql
- A trait for types that can be converted into Postgres values.
- TryFrom
Row - Converts from a
tokio_postgres::Row. Implementations are provided for rows that contain only a single value of several types that implementFromSql(currently no check is done that the row only contained one value)
Derive Macros§
- TryFrom
Row - A derive macro for
TryFromRowwhich converts from atokio-postgres::Row