Type Definition odbc_api::buffers::ColumnarAnyBuffer
source · pub type ColumnarAnyBuffer = ColumnarBuffer<AnyBuffer>;Expand description
Flexible columnar buffer implementation. Bind this to a cursor to fetch values in bulk, or pass this as a parameter to a statement, to submit many parameters at once.
Implementations§
source§impl ColumnarAnyBuffer
impl ColumnarAnyBuffer
sourcepub fn from_description(
capacity: usize,
descs: impl IntoIterator<Item = BufferDescription>
) -> Self
👎Deprecated: Use from_descs instead
pub fn from_description(
capacity: usize,
descs: impl IntoIterator<Item = BufferDescription>
) -> Self
Allocates a ColumnarBuffer fitting the buffer descriptions.
sourcepub fn from_descs(
capacity: usize,
descs: impl IntoIterator<Item = BufferDesc>
) -> Self
pub fn from_descs(
capacity: usize,
descs: impl IntoIterator<Item = BufferDesc>
) -> Self
Allocates a ColumnarBuffer fitting the buffer descriptions.
sourcepub fn try_from_description(
capacity: usize,
descs: impl Iterator<Item = BufferDescription>
) -> Result<Self, Error>
👎Deprecated: Use try from descs
pub fn try_from_description(
capacity: usize,
descs: impl Iterator<Item = BufferDescription>
) -> Result<Self, Error>
Allocates a ColumnarBuffer fitting the buffer descriptions. If not enough memory is
available to allocate the buffers this function fails with
Error::TooLargeColumnBufferSize. This function is slower than Self::from_description
which would just panic if not enough memory is available for allocation.
sourcepub fn try_from_descs(
capacity: usize,
descs: impl IntoIterator<Item = BufferDesc>
) -> Result<Self, Error>
pub fn try_from_descs(
capacity: usize,
descs: impl IntoIterator<Item = BufferDesc>
) -> Result<Self, Error>
Allocates a ColumnarBuffer fitting the buffer descriptions. If not enough memory is
available to allocate the buffers this function fails with
Error::TooLargeColumnBufferSize. This function is slower than Self::from_description
which would just panic if not enough memory is available for allocation.
sourcepub fn from_description_and_indices(
max_rows: usize,
description: impl Iterator<Item = (u16, BufferDescription)>
) -> ColumnarBuffer<AnyBuffer>
👎Deprecated: use from_descs_and_indices
pub fn from_description_and_indices(
max_rows: usize,
description: impl Iterator<Item = (u16, BufferDescription)>
) -> ColumnarBuffer<AnyBuffer>
Allows you to pass the buffer descriptions together with a one based column index referring the column, the buffer is supposed to bind to. This allows you also to ignore columns in a result set, by not binding them at all. There is no restriction on the order of column indices passed, but the function will panic, if the indices are not unique.
sourcepub fn from_descs_and_indices(
max_rows: usize,
description: impl Iterator<Item = (u16, BufferDesc)>
) -> ColumnarBuffer<AnyBuffer>
pub fn from_descs_and_indices(
max_rows: usize,
description: impl Iterator<Item = (u16, BufferDesc)>
) -> ColumnarBuffer<AnyBuffer>
Allows you to pass the buffer descriptions together with a one based column index referring the column, the buffer is supposed to bind to. This allows you also to ignore columns in a result set, by not binding them at all. There is no restriction on the order of column indices passed, but the function will panic, if the indices are not unique.