Module pgx::datum

source ·
Expand description

Handing for easily converting Postgres Datum types into their corresponding Rust types and converting Rust types into their corresponding Postgres types

Re-exports

pub use numeric::AnyNumeric;
pub use numeric::Numeric;

Modules

Structs

An array of some type (eg. TEXT[], int[])
An inet type from PostgreSQL
Represents Postgres’ internal data type, which is documented as:
A json type from PostgreSQL
A jsonb type from PostgreSQL
A wholly Rust-String owned copy of a json type from PostgreSQL
Wraps a Postgres varlena *, presenting it as if it’s a Rust type of a fixed size.
Represents Datum to serialized RangeType PG struct
Represents a deserialized state of the RangeType’s data indicates the subtype of the lower/upper bounds’ datum
A Universally Unique Identifier (UUID) from PostgreSQL
An Array compatible type which can have its core::any::TypeIds registered for Rust to SQL mapping.
A type which can have its core::any::TypeIds registered for Rust to SQL mapping.
A PgVarlena compatible type which can have its core::any::TypeIds registered for Rust to SQL mapping.

Enums

If converting a Datum to a Rust type fails, this is the set of possible reasons why.

Constants

Traits

Convert a (pg_sys::Datum, is_null:bool pair into a Rust type
Convert a Rust type into a pg_sys::Datum.
A tagging trait to indicate a user type is also meant to be used by Postgres Implemented automatically by #[derive(PostgresType)]
This trait allows a struct to be a valid subtype for a RangeType
A type which can have it’s core::any::TypeIds registered for Rust to SQL mapping.

Functions

Type Definitions