fn row_from_tuple<'a, T>(&mut self, rel_id: u32, tuple_data: T) -> Result<Row, anyhow::Error>
    where
        T: IntoIterator<Item = &'a TupleData>,
    {
        let mut row = Row::default();

        let rel_id: Datum = (rel_id as i32).into();
        row.push(rel_id);
        row.push_list_with(move |packer| {
            for val in tuple_data.into_iter() {
                let datum = match val {
                    TupleData::Null => Datum::Null,
                    TupleData::UnchangedToast => bail!(
                        "Missing TOASTed value from table with OID = {}. \
                        Did you forget to set REPLICA IDENTITY to FULL for your table?",
                        rel_id
                    ),
                    TupleData::Text(b) => std::str::from_utf8(&b)?.into(),
                };
                packer.push(datum);
            }
            Ok(())
        })?;

        Ok(row)
    }
/// Converts a Tuple received in the replication stream into a Row instance. The logical
/// replication protocol doesn't use the binary encoding for column values so contrary to the
/// initial snapshot here we need to parse the textual form of each column.
///
/// The `old_tuple` argument can be used as a source of data to use when encountering unchanged
/// TOAST values.
Converts a Tuple received in the replication stream into a Row instance. The logical
replication protocol doesn't use the binary encoding for column values so contrary to the
initial snapshot here we need to parse the textual form of each column.

The `old_tuple` argument can be used as a source of data to use when encountering unchanged
TOAST values.
Converts a Tuple received in the replication stream into a Row instance . The logical replication protocol doesn ' t use the binary encoding for column values so contrary to the initial snapshot here we need to parse the textual form of each column . The ` old_tuple ` argument can be used as a source of data to use when encountering unchanged TOAST values .
fn row_from_tuple<'a, T>(&mut self, rel_id: u32, tuple_data: T) -> Result<Row, anyhow::Error>
    where
        T: IntoIterator<Item = &'a TupleData>,
    {
        let mut row = Row::default();
        let rel_id: Datum = (rel_id as i32).into();
        row.push(rel_id);
        row.push_list_with(move |packer| {
            for val in tuple_data.into_iter() {
                let datum = match val {
                    TupleData::Null => Datum::Null,
                    TupleData::UnchangedToast => bail!(
                        "Missing TOASTed value from table with OID = {}. \
                        Did you forget to set REPLICA IDENTITY to FULL for your table?",
                        rel_id
                    ),
                    TupleData::Text(b) => std::str::from_utf8(&b)?.into(),
                };
                packer.push(datum);
            }
            Ok(())
        })?;
        Ok(row)
    }
fn row_from_tuple < ' a , T > ( & mut self , rel_id : u32 , tuple_data : T ) -> Result < Row , anyhow :: Error > where T : IntoIterator < Item = & ' a TupleData > , { let mut row = Row :: default ( ) ; let rel_id : Datum = ( rel_id as i32 ) . into ( ) ; row . push ( rel_id ) ; row . push_list_with ( move | packer | { for val in tuple_data . into_iter ( ) { let datum = match val { TupleData :: Null => Datum :: Null , TupleData :: UnchangedToast => bail ! ( " \
 " rel_id ) , TupleData :: Text ( b ) => std :: str :: from_utf8 ( & b ) ? . into ( ) , } ; packer . push ( datum ) ; } Ok ( ( ) ) } ) ? ; Ok ( row ) }
Converts a Tuple received in the replication stream into a Row instance.
Converts a Tuple received in the replication stream into a Row instance .
&mut self
rel_id
u32
tuple_data
T
&mut self
rel_id
u32
tuple_data
T