pub unsafe trait VarKind {
    const TERMINATING_ZEROES: usize;
    const C_DATA_TYPE: CDataType;

    // Required method
    fn relational_type(length: usize) -> DataType;
}
Expand description

A tag used to differentiate between different types of variadic buffers.

Safety

  • TERMINATING_ZEROES is used to calculate buffer offsets.
  • C_DATA_TYPE is used to bind parameters. Providing wrong values like e.g. a fixed length types, would cause even a correctly implemented odbc driver to access invalid memory.

Required Associated Constants§

source

const TERMINATING_ZEROES: usize

Number of terminating zeroes required for this kind of variadic buffer.

source

const C_DATA_TYPE: CDataType

Required Methods§

Implementors§

source§

impl VarKind for Binary

source§

const TERMINATING_ZEROES: usize = 0usize

source§

const C_DATA_TYPE: CDataType = CDataType::Binary

source§

impl VarKind for Text

source§

const TERMINATING_ZEROES: usize = 1usize

source§

const C_DATA_TYPE: CDataType = CDataType::Char