Expand description
PostgreSQL type system and type conversion.
This module provides:
- OID constants for PostgreSQL built-in types
- Encoding/decoding between Rust types and PostgreSQL wire format
- Type registry for runtime type information
§Example
ⓘ
use sqlmodel_postgres::types::{oid, encode::Format, decode::decode_value};
// Decode a binary integer from PostgreSQL
let value = decode_value(oid::INT4, Some(&[0, 0, 0, 42]), Format::Binary)?;
assert_eq!(value, Value::Int(42));Re-exports§
pub use decode::BinaryDecode;pub use decode::Decode;pub use decode::TextDecode;pub use decode::decode_value;pub use encode::BinaryEncode;pub use encode::Encode;pub use encode::Format;pub use encode::TextEncode;pub use encode::encode_value;
Modules§
- decode
- PostgreSQL type decoding (PostgreSQL → Rust).
- encode
- PostgreSQL type encoding (Rust → PostgreSQL).
- oid
- PostgreSQL type Object IDs (OIDs).
Structs§
- Type
Info - Information about a PostgreSQL type.
- Type
Registry - Registry of PostgreSQL types.
Enums§
- Type
Category - Category of a PostgreSQL type.