pub struct BindStateMachine { /* private fields */ }Expand description
State machine for binding a portal (Parse + Bind, no Execute/Sync).
Used by exec_iter to create a portal that can be executed multiple times.
Implementations§
Source§impl BindStateMachine
impl BindStateMachine
Sourcepub fn bind_prepared<P: ToParams>(
buffer_set: &mut BufferSet,
portal_name: &str,
statement_name: &str,
param_oids: &[Oid],
params: &P,
) -> Result<Self>
pub fn bind_prepared<P: ToParams>( buffer_set: &mut BufferSet, portal_name: &str, statement_name: &str, param_oids: &[Oid], params: &P, ) -> Result<Self>
Bind a prepared statement to a portal.
Writes Bind + Flush to buffer_set.write_buffer.
Uses the server-provided parameter OIDs to encode parameters.
§Arguments
portal_name: Portal name (empty string “” for unnamed portal)
Sourcepub fn bind_sql<P: ToParams>(
buffer_set: &mut BufferSet,
portal_name: &str,
sql: &str,
params: &P,
) -> Result<Self>
pub fn bind_sql<P: ToParams>( buffer_set: &mut BufferSet, portal_name: &str, sql: &str, params: &P, ) -> Result<Self>
Parse raw SQL and bind to a portal.
Writes Parse + Bind + Flush to buffer_set.write_buffer.
Uses the natural OIDs from the parameters to inform the server about parameter types.
§Arguments
portal_name: Portal name (empty string “” for unnamed portal)
Auto Trait Implementations§
impl Freeze for BindStateMachine
impl RefUnwindSafe for BindStateMachine
impl Send for BindStateMachine
impl Sync for BindStateMachine
impl Unpin for BindStateMachine
impl UnwindSafe for BindStateMachine
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