[−][src]Struct odbc_api::buffers::TextColumn
A buffer intended to be bound to a column of a cursor. Elements of the buffer will contain a variable amount of characters up to a maximum string length. Since most SQL types have a string representation this buffer can be bound to a column of almost any type, ODBC driver and driver manager should take care of the conversion. Since elements of this type have variable length an indicator buffer needs to be bound, wether the column is nullable or not, and therefore does not matter for this buffer.
Implementations
impl TextColumn[src]
pub fn new(batch_size: usize, max_str_len: usize) -> Self[src]
This will allocate a value and indicator buffer for batch_size elments. Each value may
have a maximum length of max_str_len. This implies that max_str_len is increased by one in
order to make space for the null terminating zero at the end of strings.
pub unsafe fn value_at(&self, row_index: usize) -> Option<&[u8]>[src]
Return the value for the given row index.
#Safety
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. It will panic however if row_index is larger or
equal to the maximum number of elements in the buffer.
Trait Implementations
impl ColumnBuffer for TextColumn[src]
fn bind_arguments(&mut self) -> BindColParameters[src]
Auto Trait Implementations
impl RefUnwindSafe for TextColumn
impl Send for TextColumn
impl Sync for TextColumn
impl Unpin for TextColumn
impl UnwindSafe for TextColumn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,