Crate simple_pg

Crate simple_pg 

Source

Re-exports§

pub use SqlFragment::Raw;

Modules§

binary_copy
Utilities for working with the PostgreSQL binary copy format.
bindings
protocol
types
Types.

Macros§

append_sql
Append SQL to SqlBuilder passed as builder; in the macro. See [crate::sql]
fieldset
sql
A SQL templating macro that allows composing fragments and binding query parameters inline.

Structs§

Config
Configuration object.
Conn
Wrapper around simple_pg_client::Client with a StatementCache.
Error
An error communicating with the Postgres server.
GeneratedSql
IterValues
JoinSql
Join a sequence SQL fragments with an optional seperator
ManagerConfig
Configuration object for a Manager.
MapIntoRow
NoTls
A MakeTlsConnect and TlsConnect implementation which simply returns an error.
Pool
Generic object and connection pool.
PoolConfig
Pool configuration.
PoolConn
Wrapper around the actual pooled connection which implements Deref, DerefMut and Drop traits.
Row
A row of data returned from the database by a query.
Sql
SqlBuilder
Timeouts
Transaction
Database Transaction with Statement Cache.
TransactionConfig
Used to configure a transaction with [Conn::transaction_configured]

Enums§

ErrorKind
Error Code for client
IsolationLevel
The isolation level of a database transaction.
PoolError
Possible errors returned by Pool::get() method.
RecyclingMethod
Possible methods of how a connection is recycled.
SqlFragment

Traits§

FromSqlOwned
A trait for types which can be created from a Postgres value without borrowing any data.
IntoTupleSlice
SqlSnippet
ToSql
A trait for types that can be converted into Postgres values.

Type Aliases§

Binding
RawConn

Attribute Macros§

test
Marks async function to be executed by runtime, suitable to test environment. In particular, it uses a shared global runtime to allow for reusing databases connections from a shared pool.