public class ForwardingResultSet extends ForwardingStructReader implements ResultSet
| Constructor and Description |
|---|
ForwardingResultSet(ResultSet delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Explicitly close the result set, releasing any associated resources.
|
Struct |
getCurrentRowAsStruct()
Creates an immutable version of the row that the result set is positioned over.
|
ResultSetStats |
getStats()
Returns the
ResultSetStats for the query only if the query was executed in either the
PLAN or the PROFILE mode via the ReadContext.analyzeQuery(Statement,
com.google.cloud.spanner.ReadContext.QueryAnalyzeMode) method or for DML statements in ReadContext#executeQuery(Statement, QueryOption...). |
boolean |
next()
Advances the result set to the next row, returning false if no such row exists.
|
getBoolean, getBoolean, getBooleanArray, getBooleanArray, getBooleanList, getBooleanList, getBytes, getBytes, getBytesList, getBytesList, getColumnCount, getColumnIndex, getColumnType, getColumnType, getDate, getDate, getDateList, getDateList, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleList, getDoubleList, getLong, getLong, getLongArray, getLongArray, getLongList, getLongList, getString, getString, getStringList, getStringList, getStructList, getStructList, getTimestamp, getTimestamp, getTimestampList, getTimestampList, getType, isNull, isNullclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoolean, getBoolean, getBooleanArray, getBooleanArray, getBooleanList, getBooleanList, getBytes, getBytes, getBytesList, getBytesList, getColumnCount, getColumnIndex, getColumnType, getColumnType, getDate, getDate, getDateList, getDateList, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleList, getDoubleList, getLong, getLong, getLongArray, getLongArray, getLongList, getLongList, getString, getString, getStringList, getStringList, getStructList, getStructList, getTimestamp, getTimestamp, getTimestampList, getTimestampList, getType, isNull, isNullpublic ForwardingResultSet(ResultSet delegate)
public boolean next()
throws SpannerException
ResultSetnext in interface ResultSetSpannerExceptionpublic Struct getCurrentRowAsStruct()
ResultSetStruct objects
is generally more expensive than processing the ResultSet directly.getCurrentRowAsStruct in interface ResultSetpublic void close()
ResultSetResultSet before ResultSet.next() has returned false or
raised an exception. Calling close() is also allowed if the result set has been fully
consumed, so a recommended practice is to unconditionally close the result set once it is done
with, typically using a try-with-resources construct.close in interface ResultSetclose in interface AutoCloseablepublic ResultSetStats getStats()
ResultSetResultSetStats for the query only if the query was executed in either the
PLAN or the PROFILE mode via the ReadContext.analyzeQuery(Statement,
com.google.cloud.spanner.ReadContext.QueryAnalyzeMode) method or for DML statements in ReadContext#executeQuery(Statement, QueryOption...). Attempts to call this method on a ResultSet not obtained from analyzeQuery or executeQuery will return a null ResultSetStats. This method must be called after ResultSet.next() has
returned @{code false}. Calling it before that will result in null ResultSetStats too.Copyright © 2019 Google LLC. All rights reserved.