Class SpannerQueryOptions
java.lang.Object
com.google.cloud.spring.data.spanner.core.AbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
com.google.cloud.spring.data.spanner.core.SpannerQueryOptions
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SpannerPageableQueryOptions
public class SpannerQueryOptions
extends AbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
Encapsulates Cloud Spanner query options. These are options that are independent of the SQL being
run.
- Since:
- 1.1
- See Also:
-
Field Summary
Fields inherited from class com.google.cloud.spring.data.spanner.core.AbstractSpannerRequestOptions
requestOptions, requestOptionType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddQueryOption
(com.google.cloud.spanner.Options.QueryOption queryOption) setAllowPartialRead
(boolean allowPartialRead) setIncludeProperties
(Set<String> includeProperties) setTimestamp
(com.google.cloud.Timestamp timestamp) setTimestampBound
(com.google.cloud.spanner.TimestampBound timestampBound) Set if this query should be executed with bounded staleness.Methods inherited from class com.google.cloud.spring.data.spanner.core.AbstractSpannerRequestOptions
getIncludeProperties, getOptions, getTimestamp, getTimestampBound, isAllowPartialRead
-
Constructor Details
-
SpannerQueryOptions
public SpannerQueryOptions()Constructor to create an instance. Use the extension-style add/set functions to add options and settings.
-
-
Method Details
-
addQueryOption
-
setIncludeProperties
- Overrides:
setIncludeProperties
in classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-
setTimestampBound
public SpannerQueryOptions setTimestampBound(com.google.cloud.spanner.TimestampBound timestampBound) Description copied from class:AbstractSpannerRequestOptions
Set if this query should be executed with bounded staleness.- Overrides:
setTimestampBound
in classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
- Parameters:
timestampBound
- the timestamp bound. Can be exact or bounded staleness.- Returns:
- this options object.
-
setTimestamp
- Overrides:
setTimestamp
in classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-
setAllowPartialRead
- Overrides:
setAllowPartialRead
in classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-