pub struct PreparedStatement {
pub idx: u64,
pub param_oids: Vec<Oid>,
/* private fields */
}Expand description
Prepared statement information.
Fields§
§idx: u64Statement index (unique within connection)
param_oids: Vec<Oid>Parameter type OIDs
Implementations§
Source§impl PreparedStatement
impl PreparedStatement
Sourcepub fn new(
idx: u64,
param_oids: Vec<Oid>,
row_desc_payload: Option<Vec<u8>>,
wire_name: String,
) -> Self
pub fn new( idx: u64, param_oids: Vec<Oid>, row_desc_payload: Option<Vec<u8>>, wire_name: String, ) -> Self
Create a new prepared statement with custom wire name.
Sourcepub fn parse_columns(&self) -> Option<Result<RowDescription<'_>>>
pub fn parse_columns(&self) -> Option<Result<RowDescription<'_>>>
Parse column descriptions from stored RowDescription payload.
Returns None if the statement doesn’t return rows.
Sourcepub fn row_desc_payload(&self) -> Option<&[u8]>
pub fn row_desc_payload(&self) -> Option<&[u8]>
Get the raw RowDescription payload.
Returns None if the statement doesn’t return rows.
Trait Implementations§
Source§impl Clone for PreparedStatement
impl Clone for PreparedStatement
Source§fn clone(&self) -> PreparedStatement
fn clone(&self) -> PreparedStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PreparedStatement
impl Debug for PreparedStatement
Source§impl IntoStatement for &PreparedStatement
impl IntoStatement for &PreparedStatement
Source§fn needs_parse(&self) -> bool
fn needs_parse(&self) -> bool
Returns true if this is raw SQL (needs Parse message).
Source§fn as_prepared(&self) -> Option<&PreparedStatement>
fn as_prepared(&self) -> Option<&PreparedStatement>
Get the prepared statement if this is a prepared statement reference.
Source§impl IntoStatement for PreparedStatement
impl IntoStatement for PreparedStatement
Source§fn needs_parse(&self) -> bool
fn needs_parse(&self) -> bool
Returns true if this is raw SQL (needs Parse message).
Source§fn as_prepared(&self) -> Option<&PreparedStatement>
fn as_prepared(&self) -> Option<&PreparedStatement>
Get the prepared statement if this is a prepared statement reference.
Auto Trait Implementations§
impl Freeze for PreparedStatement
impl RefUnwindSafe for PreparedStatement
impl Send for PreparedStatement
impl Sync for PreparedStatement
impl Unpin for PreparedStatement
impl UnwindSafe for PreparedStatement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more