Skip to main content

execute_prepared

Function execute_prepared 

Source
pub fn execute_prepared(
    connection: &Arc<Mutex<RawConnection<SyncStream>>>,
    statement: &PreparedStatement,
    params: &[Option<&[u8]>],
) -> Result<Vec<Row>>
Expand description

Executes a prepared statement with parameters.

ยงErrors

  • Returns Error (connection) if the connection mutex is poisoned.
  • Returns Error (server) if the server rejects Bind / Execute (parameter type mismatch, constraint violation, etc.).
  • Returns Error (I/O) / Error (closed) on wire-protocol I/O failure.
  • Propagates row-construction errors from Row::new if a DataRow cannot be decoded against the prepared columns.