public class SpannerReadOptions extends AbstractSpannerRequestOptions<Options.ReadOption>
requestOptions, requestOptionType
Constructor and Description |
---|
SpannerReadOptions()
Constructor to create an instance.
|
Modifier and Type | Method and Description |
---|---|
SpannerReadOptions |
addReadOption(Options.ReadOption readOption) |
String |
getIndex() |
SpannerReadOptions |
setAllowPartialRead(boolean allowPartialRead) |
SpannerReadOptions |
setIncludeProperties(Set<String> includeProperties) |
SpannerReadOptions |
setIndex(String index) |
SpannerReadOptions |
setTimestamp(com.google.cloud.Timestamp timestamp) |
SpannerReadOptions |
setTimestampBound(TimestampBound timestampBound)
Set if this query should be executed with bounded staleness.
|
SpannerQueryOptions |
toQueryOptions()
In many cases a
SpannerReadOptions class instance could be compatible with SpannerQueryOptions . |
getIncludeProperties, getOptions, getTimestamp, getTimestampBound, isAllowPartialRead
public SpannerReadOptions()
public SpannerReadOptions addReadOption(Options.ReadOption readOption)
public String getIndex()
public SpannerReadOptions setIndex(String index)
public SpannerReadOptions setIncludeProperties(Set<String> includeProperties)
setIncludeProperties
in class AbstractSpannerRequestOptions<Options.ReadOption>
public SpannerReadOptions setTimestampBound(TimestampBound timestampBound)
AbstractSpannerRequestOptions
setTimestampBound
in class AbstractSpannerRequestOptions<Options.ReadOption>
timestampBound
- the timestamp bound. Can be exact or bounded staleness.public SpannerReadOptions setTimestamp(com.google.cloud.Timestamp timestamp)
setTimestamp
in class AbstractSpannerRequestOptions<Options.ReadOption>
public SpannerReadOptions setAllowPartialRead(boolean allowPartialRead)
setAllowPartialRead
in class AbstractSpannerRequestOptions<Options.ReadOption>
public SpannerQueryOptions toQueryOptions()
SpannerReadOptions
class instance could be compatible with SpannerQueryOptions
.
The method executes such conversion or throws an exception if it's impossible.IllegalArgumentException
- when SpannerQueryOptions
can't be converted to SpannerQueryOptions
.Copyright © 2021. All rights reserved.