pub struct ColumnValue {
pub type_tag: TypeTag,
pub type_oid: u32,
pub data: Option<Vec<u8>>,
}Expand description
A single column value. Uses raw PostgreSQL binary format bytes for zero-copy efficiency.
Fields§
§type_tag: TypeTagType tag for fast dispatch.
type_oid: u32PostgreSQL type OID (for arrays, custom types, and disambiguation).
data: Option<Vec<u8>>Raw PostgreSQL binary format bytes. None represents NULL.
Implementations§
Source§impl ColumnValue
impl ColumnValue
Sourcepub fn from_pg_binary(type_tag: TypeTag, type_oid: u32, data: Vec<u8>) -> Self
pub fn from_pg_binary(type_tag: TypeTag, type_oid: u32, data: Vec<u8>) -> Self
Create a column value from raw PostgreSQL binary data.
Sourcepub fn unchanged(type_oid: u32) -> Self
pub fn unchanged(type_oid: u32) -> Self
Create a marker for an unchanged TOAST value. Used in UPDATE operations when a large column value was not modified. The type_oid is preserved so the target knows the column’s type.
Sourcepub fn is_unchanged(&self) -> bool
pub fn is_unchanged(&self) -> bool
Check if this value is an unchanged TOAST marker.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Estimate the size of this value in bytes.
Trait Implementations§
Source§impl Clone for ColumnValue
impl Clone for ColumnValue
Source§fn clone(&self) -> ColumnValue
fn clone(&self) -> ColumnValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnValue
impl Debug for ColumnValue
Source§impl<'de> Deserialize<'de> for ColumnValue
impl<'de> Deserialize<'de> for ColumnValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ColumnValue
impl PartialEq for ColumnValue
Source§impl Serialize for ColumnValue
impl Serialize for ColumnValue
impl StructuralPartialEq for ColumnValue
Auto Trait Implementations§
impl Freeze for ColumnValue
impl RefUnwindSafe for ColumnValue
impl Send for ColumnValue
impl Sync for ColumnValue
impl Unpin for ColumnValue
impl UnsafeUnpin for ColumnValue
impl UnwindSafe for ColumnValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more