public class JDBCResultSet extends InMemoryResultSet
Modifier and Type | Class and Description |
---|---|
static class |
JDBCResultSet.FieldSchemaData
FieldSchemaData is created so that we don't save FieldSchema as some classes used by it don't have
default constructors which are required by jackson
|
static class |
JDBCResultSet.JDBCResultSetMetadata
Result set metadata of a JDBC query
|
Constructor and Description |
---|
JDBCResultSet(org.apache.lens.driver.jdbc.JDBCDriver.QueryResult queryResult,
ResultSet resultSet,
boolean closeAfterFetch)
Instantiates a new JDBC result set.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close.
|
static String |
getHiveTypeForSQLType(int index,
ResultSetMetaData rsmeta)
Gets the hive type for sql type.
|
LensResultSetMetadata |
getMetadata()
Get the result set metadata
|
boolean |
hasNext()
Whether there is another result row available.
|
ResultRow |
next()
Read the next result row.
|
void |
setFetchSize(int size)
Set number of rows to be fetched at time
|
Integer |
size()
Get the size of the result set.
|
canBePurged, getCreationTime, getOutputPath, isHttpResultAvailable, setFullyAccessed, toQueryResult
public JDBCResultSet(org.apache.lens.driver.jdbc.JDBCDriver.QueryResult queryResult, ResultSet resultSet, boolean closeAfterFetch) throws LensException
queryResult
- the query resultresultSet
- the result setcloseAfterFetch
- the close after fetchLensException
public Integer size() throws LensException
LensResultSet
size
in class LensResultSet
LensException
- the lens exceptionpublic LensResultSetMetadata getMetadata() throws LensException
LensResultSet
getMetadata
in class LensResultSet
LensResultSetMetadata
LensException
public static String getHiveTypeForSQLType(int index, ResultSetMetaData rsmeta) throws SQLException
index
- the indexrsmeta
- the rsmetaSQLException
- the SQL exceptionpublic void setFetchSize(int size) throws LensException
InMemoryResultSet
setFetchSize
in class InMemoryResultSet
LensException
public ResultRow next() throws LensException
InMemoryResultSet
next
in class InMemoryResultSet
LensException
- the lens exceptionpublic boolean hasNext() throws LensException
InMemoryResultSet
hasNext
in class InMemoryResultSet
LensException
- the lens exceptionpublic void close()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.