pub struct SqlIterator /* private fields */ Iterates over the records an SQL query returns.
The first batch is fetched when the iterator is created. Call SqlIterator::close when done to drop the paging tables; nothing drops them otherwise.
Implementations
impl SqlIterator
Runs sql, fetching 10,000 records at a time.
pub async fn with_batch_size( db: Arc<Kinetica>, sql: &str, batch_size: i32, ) -> Result<Self, KineticaError>
Runs sql, fetching batch_size records at a time.
Runs sql with the given SQL options, fetching 10,000 records at a time.
Runs sql with the given SQL options, fetching batch_size records at a time. A paging_table option is replaced: the iterator pages through a table of its own, and drops it on close.
Replaces the SQL options, keeping this iterator’s paging table. A paging_table option is replaced, as when the iterator is created.
pub fn total_records(&self) -> i64
The number of records the query returns in all.
pub async fn next(&mut self) -> Result<GenericRecord, KineticaError>
The next record, fetching the next batch when this one is done. Fails when there are no more.