public class GPUdbSqlIterator<T extends Record> extends Object implements Iterable<T>, AutoCloseable
GPUdb
instance and an SQL statement to facilitate iteration
over the records returned by the query. SQL options can be passed as
a Map
. The 'batchSize' for the number of records
returned is set to a default of '10000', which can be modified using
the parameter 'batchSize' to the constructor.
Copyright (c) 2023 Kinetica DB Inc.Constructor and Description |
---|
GPUdbSqlIterator(GPUdb db,
String sql)
Constructor for
GPUdbSqlIterator |
GPUdbSqlIterator(GPUdb db,
String sql,
int batchSize)
Constructor for
GPUdbSqlIterator |
GPUdbSqlIterator(GPUdb db,
String sql,
int batchSize,
Map<String,String> sqlOptions)
Constructor for
GPUdbSqlIterator |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Iterator<T> |
iterator() |
void |
setSqlOptions(Map<String,String> sqlOptions) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public GPUdbSqlIterator(GPUdb db, String sql)
GPUdbSqlIterator
db
- - a GPUdb
instancesql
- - the SQL statement to executepublic GPUdbSqlIterator(GPUdb db, String sql, int batchSize)
GPUdbSqlIterator
db
- - a GPUdb
instancesql
- - the SQL statement to executebatchSize
- - the number of records to fetchpublic GPUdbSqlIterator(GPUdb db, String sql, int batchSize, Map<String,String> sqlOptions)
GPUdbSqlIterator
db
- - a GPUdb
instancesql
- - the SQL statement to executebatchSize
- - the number of records to fetchsqlOptions
- - the SQL options to be passed inGPUdb.executeSql(String, long, long, String, List, Map)
Copyright © 2024. All rights reserved.