Package com.google.cloud.spanner
Interface ProtobufResultSet
- All Superinterfaces:
AutoCloseable,ResultSet,StructReader
- All Known Implementing Classes:
ForwardingAsyncResultSet,ForwardingResultSet
Interface for
ResultSets that can return a protobuf value.-
Method Summary
Modifier and TypeMethodDescriptionbooleancanGetProtobufValue(int columnIndex) Returns true if the protobuf value for the given column is still available.com.google.protobuf.ValuegetProtobufValue(int columnIndex) Returns the column value as a protobuf value.Methods inherited from interface com.google.cloud.spanner.ResultSet
close, getCurrentRowAsStruct, getMetadata, getStats, nextMethods 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, getInterval, getInterval, getIntervalList, getIntervalList, getJson, getJson, getJsonList, getJsonList, getLong, getLong, getLongArray, getLongArray, getLongList, getLongList, getOrDefault, getOrDefault, getOrNull, getOrNull, getPgJsonb, getPgJsonb, getPgJsonbList, getPgJsonbList, getProtoEnum, getProtoEnum, getProtoEnumList, getProtoEnumList, getProtoMessage, getProtoMessage, getProtoMessageList, getProtoMessageList, getString, getString, getStringList, getStringList, getStructList, getStructList, getTimestamp, getTimestamp, getTimestampList, getTimestampList, getType, getUuid, getUuid, getUuidList, getUuidList, 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
DecodeModethat is used for theResultSetmust be one ofDecodeMode.LAZY_PER_ROWandDecodeMode.LAZY_PER_COL, and that the correspondingStructReader.getValue(int),StructReader.getBoolean(int), ... method may not yet have been called for the column.
-