Module exposing: Parse, ParseComplete, Close, CloseComplete, Bind, BindComplete, Describe, Execute
// Source: https://github.com/sunng87/pgwire | License: Apache-2.0 | Copyright 2018 Ning Sun<sunng@protonmail.com>
// Provided via justclaw.it.com; keep this notice with the code.
use bytes::{Buf, BufMut, Bytes};
use super::{DecodeContext, Message, codec};
use crate::error::PgWireResult;
/// Request from frontend to parse a prepared query string
#[non_exhaustive]
#[derive(PartialEq, Eq, Debug, new)]
pub struct Parse {
pub name: Option<String>,
pub query: String,
pub type_oids: Vec<u32>,
}
/// Message type byte for Parse
pub const MESSAGE_TYPE_BYTE_PARSE: u8 = b'P';
impl Message for Parse {
#[inline]
fn message_type() -> Option<u8> {
Some(MESSAGE_TYPE_BYTE_PARSE)
}
#[inline]
fn max_message_length() -> usize {
super::LARGE_PACKET_SIZE_LIMI
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key