|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lens.server.api.driver.LensResultSet org.apache.lens.server.api.driver.InMemoryResultSet org.apache.lens.driver.jdbc.JDBCResultSet
public class JDBCResultSet
The Class JDBCResultSet.
Nested Class Summary | |
---|---|
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 |
Field Summary | |
---|---|
static org.apache.log4j.Logger |
LOG
The Constant LOG. |
Constructor Summary | |
---|---|
JDBCResultSet(org.apache.lens.driver.jdbc.JDBCDriver.QueryResult queryResult,
ResultSet resultSet,
boolean closeAfterFetch)
Instantiates a new JDBC result set. |
Method Summary | |
---|---|
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 |
int |
size()
Get the size of the result set. |
Methods inherited from class org.apache.lens.server.api.driver.InMemoryResultSet |
---|
toQueryResult |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger LOG
Constructor Detail |
---|
public JDBCResultSet(org.apache.lens.driver.jdbc.JDBCDriver.QueryResult queryResult, ResultSet resultSet, boolean closeAfterFetch)
queryResult
- the query resultresultSet
- the result setcloseAfterFetch
- the close after fetchMethod Detail |
---|
public int 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 rsmeta
SQLException
- 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |