MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / bind_statement

Function bind_statement

tests/client_compat.rs:1138–1150  ·  view source on GitHub ↗
(portal: &str, statement: &str, values: &[&str])

Source from the content-addressed store, hash-verified

1136}
1137
1138fn bind_statement(portal: &str, statement: &str, values: &[&str]) -> Vec<u8> {
1139 let mut body = Vec::new();
1140 add_cstring(&mut body, portal);
1141 add_cstring(&mut body, statement);
1142 body.extend_from_slice(&0_i16.to_be_bytes());
1143 body.extend_from_slice(&(values.len() as i16).to_be_bytes());
1144 for value in values {
1145 body.extend_from_slice(&(value.len() as i32).to_be_bytes());
1146 body.extend_from_slice(value.as_bytes());
1147 }
1148 body.extend_from_slice(&0_i16.to_be_bytes());
1149 tagged_message(b'B', body)
1150}
1151
1152fn describe_portal(portal: &str) -> Vec<u8> {
1153 let mut body = Vec::new();

Calls 3

add_cstringFunction · 0.85
tagged_messageFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected