MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / encode_unchecked

Method encode_unchecked

src/interchange/src/text_binary.rs:33–42  ·  view source on GitHub ↗
(&self, row: mz_repr::Row)

Source from the content-addressed store, hash-verified

31
32impl Encode for TextEncoder {
33 fn encode_unchecked(&self, row: mz_repr::Row) -> Vec<u8> {
34 let mut buf = BytesMut::new();
35 for ((_, typ), val) in self.columns.iter().zip_eq(row.iter()) {
36 if let Some(pgrepr_value) = mz_pgrepr::Value::from_datum(val, &typ.scalar_type) {
37 pgrepr_value.encode_text(&mut buf);
38 }
39 }
40
41 buf.to_vec()
42 }
43}
44
45#[derive(Debug)]

Callers

nothing calls this directly

Calls 5

encode_textMethod · 0.80
to_vecMethod · 0.80
expectMethod · 0.80
iterMethod · 0.45
encode_binaryMethod · 0.45

Tested by

no test coverage detected