Trait odbc_api::ParameterCollection

source ·
pub unsafe trait ParameterCollection {
    // Required methods
    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§

source

fn parameter_set_size(&self) -> usize

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.

source

unsafe fn bind_parameters_to( &mut self, stmt: &mut impl Statement ) -> Result<(), Error>

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ParameterCollection for BlobParam<'_>

source§

impl<T> ParameterCollection for T
where T: InputParameterCollection + ?Sized,