Struct hdbconnect::PreparedStatement
source · pub struct PreparedStatement { /* private fields */ }
Expand description
Allows injection-safe SQL execution and repeated calls of the same statement with different parameters with as few roundtrips as possible.
Implementations§
source§impl PreparedStatement
impl PreparedStatement
sourcepub fn parameter_descriptors(&self) -> Option<&Vec<ParameterDescriptor>>
pub fn parameter_descriptors(&self) -> Option<&Vec<ParameterDescriptor>>
Descriptors of the parameters of the prepared statement, if any.
sourcepub fn add_batch<T: Serialize>(&mut self, input: &T) -> HdbResult<()>
pub fn add_batch<T: Serialize>(&mut self, input: &T) -> HdbResult<()>
Converts the input into a row of parameters for the batch, if it is consistent with the metadata.
sourcepub fn execute_batch(&mut self) -> HdbResult<HdbResponse>
pub fn execute_batch(&mut self) -> HdbResult<HdbResponse>
Executes the statement with the collected batch, and clears the batch.
sourcepub fn set_auto_commit(&mut self, ac: bool) -> HdbResult<()>
pub fn set_auto_commit(&mut self, ac: bool) -> HdbResult<()>
Sets the auto-commit of the prepared statement’s connection for future calls.