Expand description
Prepared statement support using extended query protocol.
§Parameter Encoding
Use the [params!] macro for ergonomic parameter encoding:
let stmt = client.prepare("SELECT * FROM users WHERE id = $1 AND name = $2")?;
let rows = client.execute(&stmt, params![42_i32, "Alice"])?;Structs§
- Owned
Prepared Statement - A prepared statement that automatically closes itself when dropped.
- Prepared
Statement - A prepared statement.
Traits§
- SqlParam
- Trait for types that can be encoded as SQL prepared statement parameters.
Functions§
- close_
statement - Closes a prepared statement on the server.
- execute_
prepared - Executes a prepared statement with parameters.
- execute_
prepared_ no_ result - Executes a prepared statement that doesn’t return rows.
- prepare
- Prepares a statement using the extended query protocol.
- prepare_
owned - Creates an owned prepared statement that automatically closes when dropped.