odbc_api::parameter

Type Alias VarCharArray

Source
pub type VarCharArray<const LENGTH: usize> = VarChar<[u8; LENGTH]>;
Expand description

A stack allocated VARCHAR type.

Due to its memory layout this type can be bound either as a single parameter, or as a column of a row-by-row output, but not be used in columnar parameter arrays or output buffers.

You can also use VarCharArray as an output type for statement execution using crate::parameter::Out or crate::parameter::InOut.

§Example

let mut out_msg: VarCharArray<255> = VarCharArray::NULL;
connection.execute("CALL PROCEDURE_NAME(?)", (Out(&mut out_msg),))?;

Aliased Type§

struct VarCharArray<const LENGTH: usize> { /* private fields */ }

Trait Implementations§

Source§

impl<const LENGTH: usize> FetchRowMember for VarCharArray<LENGTH>

Source§

fn indicator(&self) -> Option<Indicator>

Indicator for variable sized or nullable types, None for fixed sized types.
Source§

fn find_truncation(&self, buffer_index: usize) -> Option<TruncationInfo>

Some if the indicator indicates truncation. Always None for fixed sized types.
Source§

unsafe fn bind_to_col( &mut self, col_index: u16, cursor: &mut StatementRef<'_>, ) -> Result<(), Error>

Bind row element to column. Only called for the first row in a row wise buffer. Read more