Enum odbc_api::buffers::AnyColumnBuffer
source · [−]pub enum AnyColumnBuffer {
Show 25 variants
Binary(BinColumn),
Text(CharColumn),
WText(WCharColumn),
Date(Vec<Date>),
Time(Vec<Time>),
Timestamp(Vec<Timestamp>),
F64(Vec<f64>),
F32(Vec<f32>),
I8(Vec<i8>),
I16(Vec<i16>),
I32(Vec<i32>),
I64(Vec<i64>),
U8(Vec<u8>),
Bit(Vec<Bit>),
NullableDate(ColumnWithIndicator<Date>),
NullableTime(ColumnWithIndicator<Time>),
NullableTimestamp(ColumnWithIndicator<Timestamp>),
NullableF64(ColumnWithIndicator<f64>),
NullableF32(ColumnWithIndicator<f32>),
NullableI8(ColumnWithIndicator<i8>),
NullableI16(ColumnWithIndicator<i16>),
NullableI32(ColumnWithIndicator<i32>),
NullableI64(ColumnWithIndicator<i64>),
NullableU8(ColumnWithIndicator<u8>),
NullableBit(ColumnWithIndicator<Bit>),
}
Variants
Binary(BinColumn)
A buffer for holding both nullable and required binary data.
Text(CharColumn)
A buffer for holding both nullable and required text data. Uses the system encoding for character data.
WText(WCharColumn)
A buffer for holding both nullable and required text data. Uses UTF-16 encoding
Date(Vec<Date>)
Time(Vec<Time>)
Timestamp(Vec<Timestamp>)
F64(Vec<f64>)
F32(Vec<f32>)
I8(Vec<i8>)
I16(Vec<i16>)
I32(Vec<i32>)
I64(Vec<i64>)
U8(Vec<u8>)
Bit(Vec<Bit>)
NullableDate(ColumnWithIndicator<Date>)
NullableTime(ColumnWithIndicator<Time>)
NullableTimestamp(ColumnWithIndicator<Timestamp>)
NullableF64(ColumnWithIndicator<f64>)
NullableF32(ColumnWithIndicator<f32>)
NullableI8(ColumnWithIndicator<i8>)
NullableI16(ColumnWithIndicator<i16>)
NullableI32(ColumnWithIndicator<i32>)
NullableI64(ColumnWithIndicator<i64>)
NullableU8(ColumnWithIndicator<u8>)
NullableBit(ColumnWithIndicator<Bit>)
Implementations
sourceimpl AnyColumnBuffer
impl AnyColumnBuffer
sourcepub fn from_description(max_rows: usize, desc: BufferDescription) -> Self
pub fn from_description(max_rows: usize, desc: BufferDescription) -> Self
Map buffer description to actual buffer.
Trait Implementations
sourceimpl CData for AnyColumnBuffer
impl CData for AnyColumnBuffer
sourcefn cdata_type(&self) -> CDataType
fn cdata_type(&self) -> CDataType
The identifier of the C data type of the value buffer. When it is retrieving data from the
data source with fetch
, the driver converts the data to this type. When it sends data to
the source, the driver converts the data from this type. Read more
sourcefn indicator_ptr(&self) -> *const isize
fn indicator_ptr(&self) -> *const isize
Indicates the length of variable sized types. May be zero for fixed sized types. Used to determine the size or existence of input parameters. Read more
sourcefn value_ptr(&self) -> *const c_void
fn value_ptr(&self) -> *const c_void
Pointer to a value corresponding to the one described by cdata_type
.
sourcefn buffer_length(&self) -> isize
fn buffer_length(&self) -> isize
Maximum length of the type in bytes (not characters). It is required to index values in
bound buffers, if more than one parameter is bound. Can be set to zero for types not bound
as parameter arrays, i.e. CStr
. Read more
sourceimpl CDataMut for AnyColumnBuffer
impl CDataMut for AnyColumnBuffer
sourcefn mut_indicator_ptr(&mut self) -> *mut isize
fn mut_indicator_ptr(&mut self) -> *mut isize
Indicates the length of variable sized types. May be zero for fixed sized types.
sourcefn mut_value_ptr(&mut self) -> *mut c_void
fn mut_value_ptr(&mut self) -> *mut c_void
Pointer to a value corresponding to the one described by cdata_type
.
sourceimpl ColumnBuffer for AnyColumnBuffer
impl ColumnBuffer for AnyColumnBuffer
sourcefn fill_default(&mut self, from: usize, to: usize)
fn fill_default(&mut self, from: usize, to: usize)
Fills the column with the default representation of values, between from
and to
index.
sourcefn view(&self, valid_rows: usize) -> AnyColumnView<'_>
fn view(&self, valid_rows: usize) -> AnyColumnView<'_>
Num rows may not exceed the actually amount of valid num_rows filled be the ODBC API. The column buffer does not know how many elements were in the last row group, and therefore can not guarantee the accessed element to be valid and in a defined state. It also can not panic on accessing an undefined element. Read more
sourceunsafe fn view_mut(&mut self, num_rows: usize) -> AnyColumnViewMut<'_>
unsafe fn view_mut(&mut self, num_rows: usize) -> AnyColumnViewMut<'_>
Safety Read more
sourceimpl<'a> ColumnProjections<'a> for AnyColumnBuffer
impl<'a> ColumnProjections<'a> for AnyColumnBuffer
type View = AnyColumnView<'a>
type View = AnyColumnView<'a>
Immutable view on the column data. Used in safe abstractions. User must not be able to access uninitialized or invalid memory of the buffer through this interface. Read more
type ViewMut = AnyColumnViewMut<'a>
type ViewMut = AnyColumnViewMut<'a>
Used to gain access to the buffer, if bound as a parameter for inserting.
sourceimpl Debug for AnyColumnBuffer
impl Debug for AnyColumnBuffer
sourceimpl HasDataType for AnyColumnBuffer
impl HasDataType for AnyColumnBuffer
Auto Trait Implementations
impl RefUnwindSafe for AnyColumnBuffer
impl Send for AnyColumnBuffer
impl Sync for AnyColumnBuffer
impl Unpin for AnyColumnBuffer
impl UnwindSafe for AnyColumnBuffer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more