Package com.google.cloud.spanner
Interface ProtobufResultSet
- All Superinterfaces:
AutoCloseable
,ResultSet
,StructReader
- All Known Implementing Classes:
ForwardingAsyncResultSet
,ForwardingResultSet
Interface for
ResultSet
s that can return a protobuf value.-
Method Summary
Modifier and TypeMethodDescriptionboolean
canGetProtobufValue
(int columnIndex) Returns true if the protobuf value for the given column is still available.com.google.protobuf.Value
getProtobufValue
(int columnIndex) Returns the column value as a protobuf value.Methods inherited from interface com.google.cloud.spanner.ResultSet
close, getCurrentRowAsStruct, getMetadata, getStats, next
Methods inherited from interface com.google.cloud.spanner.StructReader
getBigDecimal, getBigDecimal, getBigDecimalList, getBigDecimalList, getBoolean, getBoolean, getBooleanArray, getBooleanArray, getBooleanList, getBooleanList, getBytes, getBytes, getBytesList, getBytesList, getColumnCount, getColumnIndex, getColumnType, getColumnType, getDate, getDate, getDateList, getDateList, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleList, getDoubleList, getFloat, getFloat, getFloatArray, getFloatArray, getFloatList, getFloatList, getJson, getJson, getJsonList, getJsonList, getLong, getLong, getLongArray, getLongArray, getLongList, getLongList, getPgJsonb, getPgJsonb, getPgJsonbList, getPgJsonbList, getProtoEnum, getProtoEnum, getProtoEnumList, getProtoEnumList, getProtoMessage, getProtoMessage, getProtoMessageList, getProtoMessageList, getString, getString, getStringList, getStringList, getStructList, getStructList, getTimestamp, getTimestamp, getTimestampList, getTimestampList, getType, getValue, getValue, isNull, isNull
-
Method Details
-
canGetProtobufValue
boolean canGetProtobufValue(int columnIndex) Returns true if the protobuf value for the given column is still available. -
getProtobufValue
@InternalApi com.google.protobuf.Value getProtobufValue(int columnIndex) Returns the column value as a protobuf value.This is an internal method not intended for external usage.
This method may only be called before the column value has been decoded to a plain Java object. This means that the
DecodeMode
that is used for theResultSet
must be one ofDecodeMode.LAZY_PER_ROW
andDecodeMode.LAZY_PER_COL
, and that the correspondingStructReader.getValue(int)
,StructReader.getBoolean(int)
, ... method may not yet have been called for the column.
-