pub trait Cursor: ResultSetMetadata {
    fn bind_buffer<B>(
        self,
        row_set_buffer: B
    ) -> Result<RowSetCursor<Self, B>, Error>
    where
        Self: Sized,
        B: RowSetBuffer
; fn next_row(&mut self) -> Result<Option<CursorRow<'_>>, Error> { ... } }
Expand description

Cursors are used to process and iterate the result sets returned by executing queries.

Required Methods

Binds this cursor to a buffer holding a row set.

Provided Methods

Advances the cursor to the next row in the result set. This is Slow. Bind buffers instead, for good performance.

While this method is very convenient due to the fact that the application does not have to declare and bind specific buffers it is also in many situations extremely slow. Concrete performance depends on the ODBC driver in question, but it is likely it performs a roundtrip to the datasource for each individual row. It is also likely an extra conversion is performed then requesting individual fields, since the C buffer type is not known to the driver in advance. Consider binding a buffer to the cursor first using Self::bind_buffer.

Implementors