Skip to main content

value_to_pg_wire_bytes

Function value_to_pg_wire_bytes 

Source
pub fn value_to_pg_wire_bytes(value: &Value) -> Option<Vec<u8>>
Expand description

Encode a Value as the UTF-8 text representation PG’s text-mode protocol expects. Binary format is opt-in via a flag in the client’s Bind message — we don’t advertise binary support yet, so simple text encoding is sufficient for every supported client.

Returns None for Value::Null (the caller emits a -1 length).