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

Represents Postgres’ internal data type, which is documented as:
Wraps a Postgres varlena *, presenting it as if it’s a Rust type of a fixed size.
A Universally Unique Identifier (UUID).
A Array compatible type which can have it’s core::any::TypeIds registered for Rust to SQL mapping.
A type which can have it’s core::any::TypeIds registered for Rust to SQL mapping.
A PgVarlena compatible type which can have it’s 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)]
A type which can have it’s core::any::TypeIds registered for Rust to SQL mapping.

Functions

Type Definitions