pub struct Statement { /* private fields */ }Expand description
A prepared statement with parameter types and result column descriptions.
Implementations§
Source§impl Statement
impl Statement
pub fn new( name: String, sql: String, param_types: Vec<Oid>, columns: Option<Vec<FieldDescription>>, ) -> Self
Sourcepub fn param_types(&self) -> &[Oid]
pub fn param_types(&self) -> &[Oid]
Parameter type OIDs.
Sourcepub fn param_count(&self) -> usize
pub fn param_count(&self) -> usize
Number of parameters.
Sourcepub fn columns(&self) -> Option<&[FieldDescription]>
pub fn columns(&self) -> Option<&[FieldDescription]>
Result column descriptions. None for statements that don’t return rows.
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Number of result columns. 0 if the statement doesn’t return rows.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Statement
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin for Statement
impl UnwindSafe for Statement
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