pub unsafe trait ParameterCollection {
    fn parameter_set_size(&self) -> usize;
    unsafe fn bind_parameters_to(
        &mut self,
        stmt: &mut impl Statement
    ) -> Result<(), Error>; }
Expand description

Implementers of this trait can be bound to a statement through a self::ParameterCollectionRef.

Safety

Parameters bound to the statement must remain valid for the lifetime of the instance.

Required Methods§

Number of values per parameter in the collection. This can be different from the maximum batch size a buffer may be able to hold. Returning 0 will cause the the query not to be executed.

Bind the parameters to a statement

Safety

Since the parameter is now bound to stmt callers must take care that it is ensured that the parameter remains valid while it is used. If the parameter is bound as an output parameter it must also be ensured that it is exclusively referenced by statement.

Implementors§