diesel/pg/
mod.rs

1//! Provides types and functions related to working with PostgreSQL
2//!
3//! Much of this module is re-exported from database agnostic locations.
4//! However, if you are writing code specifically to extend Diesel on
5//! PostgreSQL, you may need to work with this module directly.
6
7pub mod expression;
8pub mod types;
9pub mod upsert;
10
11mod backend;
12mod connection;
13mod metadata_lookup;
14mod query_builder;
15pub(crate) mod serialize;
16mod transaction;
17
18pub use self::backend::{Pg, PgTypeMetadata};
19pub use self::connection::PgConnection;
20pub use self::metadata_lookup::PgMetadataLookup;
21pub use self::query_builder::DistinctOnClause;
22pub use self::query_builder::PgQueryBuilder;
23pub use self::transaction::TransactionBuilder;
24
25/// Data structures for PG types which have no corresponding Rust type
26///
27/// Most of these types are used to implement `ToSql` and `FromSql` for higher
28/// level types.
29pub mod data_types {
30    #[doc(inline)]
31    pub use super::types::date_and_time::{PgDate, PgInterval, PgTime, PgTimestamp};
32    #[doc(inline)]
33    pub use super::types::floats::PgNumeric;
34    #[doc(inline)]
35    pub use super::types::money::PgMoney;
36    pub use super::types::money::PgMoney as Cents;
37}