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

Function decode_describe

src/pgwire/src/codec.rs:844–852  ·  view source on GitHub ↗
(mut buf: Cursor)

Source from the content-addressed store, hash-verified

842}
843
844fn decode_describe(mut buf: Cursor) -> Result<FrontendMessage, io::Error> {
845 let first_char = buf.read_byte()?;
846 let name = buf.read_cstr()?.to_string();
847 match first_char {
848 b'S' => Ok(FrontendMessage::DescribeStatement { name }),
849 b'P' => Ok(FrontendMessage::DescribePortal { name }),
850 other => Err(input_err(format!("Invalid describe type: {:#x?}", other))),
851 }
852}
853
854fn decode_bind(mut buf: Cursor) -> Result<FrontendMessage, io::Error> {
855 let portal_name = buf.read_cstr()?.to_string();

Callers 1

decodeMethod · 0.85

Calls 4

input_errFunction · 0.85
read_byteMethod · 0.80
read_cstrMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected