MCPcopy Create free account
hub / github.com/erans/pgsqlite / send_query

Function send_query

tests/benchmark_batch_operations.rs:255–261  ·  view source on GitHub ↗
(stream: &mut TcpStream, query: &str)

Source from the content-addressed store, hash-verified

253}
254
255async fn send_query(stream: &mut TcpStream, query: &str) {
256 let mut msg = vec![b'Q'];
257 msg.extend_from_slice(&((query.len() + 5) as u32).to_be_bytes());
258 msg.extend_from_slice(query.as_bytes());
259 msg.push(0);
260 stream.write_all(&msg).await.unwrap();
261}
262
263async fn read_until_ready(stream: &mut TcpStream) {
264 loop {

Callers 1

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected