[][src]Struct odbc_api::cursor::Cursor

pub struct Cursor<'open_connection> { /* fields omitted */ }

Implementations

impl<'o> Cursor<'o>[src]

pub fn describe_col(
    &self,
    column_number: USmallInt,
    column_description: &mut ColumnDescription
) -> Result<(), Error>
[src]

Fetch a column description using the column index.

Parameters

  • column_number: Column index. 0 is the bookmark column. The other column indices start with 1.
  • column_description: Holds the description of the column after the call. This method does not provide strong exception safety as the value of this argument is undefined in case of an error.

pub fn num_result_cols(&self) -> Result<SmallInt, Error>[src]

Number of columns in result set.

pub fn fetch(&mut self) -> Result<bool, Error>[src]

Returns the next rowset in the result set.

If any columns are bound, it returns the data in those columns. If the application has specified a pointer to a row status array or a buffer in which to return the number of rows fetched, fetch also returns this information. Calls to fetch can be mixed with calls to fetch_scroll.

pub unsafe fn set_row_array_size(&mut self, size: UInteger) -> Result<(), Error>[src]

Sets the batch size for bulk cursors, if retrieving many rows at once.

pub unsafe fn set_num_rows_fetched(
    &mut self,
    num_rows: &mut ULen
) -> Result<(), Error>
[src]

Bind an integer to hold the number of rows retrieved with fetch in the current row set.

pub unsafe fn set_row_bind_type(&mut self, row_size: u32) -> Result<(), Error>[src]

Sets the binding type to columnar binding for batch cursors.

Any Positive number indicates a row wise binding with that row length. 0 indicates a columnar binding.

pub fn unbind_cols(&mut self) -> Result<(), Error>[src]

Release all columen buffers bound by bind_col. Except bookmark column.

pub unsafe fn bind_col(
    &mut self,
    column_number: USmallInt,
    target_type: CDataType,
    target_value: Pointer,
    target_length: Len,
    indicator: *mut Len
) -> Result<(), Error>
[src]

Binds application data buffers to columns in the result set

  • column_number: 0 is the bookmark column. It is not included in some result sets. All other columns are numbered starting with 1. It is an error to bind a higher-numbered column than there are columns in the result set. This error cannot be detected until the result set has been created, so it is returned by fetch, not bind_col.
  • target_type: 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.
  • target_value: Pointer to the data buffer to bind to the column.
  • target_length: Length of target value in bytes. (Or for a single element in case of bulk aka. block fetching data).
  • indicator: Buffer is going to hold length or indicator values.

Safety

It is the callers responsibility to make sure the bound columns live until they are no longer bound.

Trait Implementations

impl<'o> Drop for Cursor<'o>[src]

Auto Trait Implementations

impl<'open_connection> RefUnwindSafe for Cursor<'open_connection>

impl<'open_connection> !Send for Cursor<'open_connection>

impl<'open_connection> !Sync for Cursor<'open_connection>

impl<'open_connection> Unpin for Cursor<'open_connection>

impl<'open_connection> UnwindSafe for Cursor<'open_connection>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.