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
Constructors -
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:
setIncludePropertiesin classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-
setTimestampBound
public SpannerQueryOptions setTimestampBound(com.google.cloud.spanner.TimestampBound timestampBound) Description copied from class:AbstractSpannerRequestOptionsSet if this query should be executed with bounded staleness.- Overrides:
setTimestampBoundin classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>- Parameters:
timestampBound- the timestamp bound. Can be exact or bounded staleness.- Returns:
- this options object.
-
setTimestamp
- Overrides:
setTimestampin classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-
setAllowPartialRead
- Overrides:
setAllowPartialReadin classAbstractSpannerRequestOptions<com.google.cloud.spanner.Options.QueryOption>
-