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

Method encode

src/pgrepr/src/value.rs:352–360  ·  view source on GitHub ↗

Serializes this value to `buf` in the specified `format`.

(&self, ty: &Type, format: Format, buf: &mut BytesMut)

Source from the content-addressed store, hash-verified

350
351 /// Serializes this value to `buf` in the specified `format`.
352 pub fn encode(&self, ty: &Type, format: Format, buf: &mut BytesMut) -> Result<(), io::Error> {
353 match format {
354 Format::Text => {
355 self.encode_text(buf);
356 Ok(())
357 }
358 Format::Binary => self.encode_binary(ty, buf),
359 }
360 }
361
362 /// Serializes this value to `buf` using the [text encoding
363 /// format](Format::Text).

Callers 15

toBase64Function · 0.45
__init__Method · 0.45
run_queryMethod · 0.45
execute_oneFunction · 0.45
processFunction · 0.45
workflow_test_ss_193Function · 0.45
modify_table_loopFunction · 0.45
kubectl_setupMethod · 0.45
destroyMethod · 0.45

Calls 2

encode_textMethod · 0.80
encode_binaryMethod · 0.45

Tested by 6

test_credentialsFunction · 0.36
create_connectionMethod · 0.36
create_cursorMethod · 0.36
_execute_sqlMethod · 0.36
setup_structuresFunction · 0.36
exist_structuresFunction · 0.36