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

Function encode

src/expr/src/scalar/func.rs:366–369  ·  view source on GitHub ↗
(bytes: &[u8], format: &str)

Source from the content-addressed store, hash-verified

364
365#[sqlfunc]
366fn encode(bytes: &[u8], format: &str) -> Result<String, EvalError> {
367 let format = encoding::lookup_format(format)?;
368 Ok(format.encode(bytes))
369}
370
371#[sqlfunc]
372fn decode(string: &str, format: &str) -> Result<Vec<u8>, EvalError> {

Callers 2

encodeMethod · 0.50

Calls 2

lookup_formatFunction · 0.85
encodeMethod · 0.45

Tested by 1