Module pg

Source
Available on crate feature postgres_backend only.
Expand description

Provides types and functions related to working with PostgreSQL

Much of this module is re-exported from database agnostic locations. However, if you are writing code specifically to extend Diesel on PostgreSQL, you may need to work with this module directly.

Modules§

data_types
Data structures for PG types which have no corresponding Rust type
expression
PostgreSQL related query builder extensions
sql_types
PostgreSQL specific SQL types

Structs§

CopyFromQuery
The structure returned by copy_from
CopyToQuery
The structure returned by copy_to
DistinctOnClause
Represents DISTINCT ON (...)
FailedToLookupTypeErrori-implement-a-third-party-backend-and-opt-into-breaking-changes
This error indicates that a type lookup for a custom postgres type failed
Pg
The PostgreSQL backend
PgConnectionpostgres
The connection string expected by PgConnection::establish should be a PostgreSQL connection string, as documented at https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING
PgMetadataCachei-implement-a-third-party-backend-and-opt-into-breaking-changes
Cache for the OIDs of custom Postgres types
PgMetadataCacheKeyi-implement-a-third-party-backend-and-opt-into-breaking-changes
The key used to lookup cached type oid’s inside of a PgMetadataCache.
PgNotification
See Postgres documentation for SQL Commands NOTIFY and LISTEN
PgQueryBuilder
The PostgreSQL query builder
PgRowByRowLoadingModepostgres
A PgConnection specific loading mode to load rows one by one
PgTypeMetadata
The OIDs for a SQL type
PgValue
Raw postgres value as received from the database
TransactionBuilder
Used to build a transaction, specifying additional details.

Enums§

CopyFormat
Describes the format used by COPY FROM or COPY TO statements
CopyHeader
Describes the different possible settings for the HEADER option for COPY FROM statements

Traits§

CopyTarget
A expression that could be used as target/source for COPY FROM and COPY TO commands
GetPgMetadataCachei-implement-a-third-party-backend-and-opt-into-breaking-changes
Gets the PgMetadataCache for a Connection<Backend=Pg> so that the lookup of user defined types, or types which come from an extension can be cached.
OrderDecorator
A decorator trait for OrderClause It helps to have bounds on either Col, Asc and Desc.
PgMetadataLookup
Determines the OID of types at runtime
TypeOidLookupi-implement-a-third-party-backend-and-opt-into-breaking-changes
This is a helper trait to defer a type oid lookup to a later point in time