Class SpannerPageableQueryOptions
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
com.google.cloud.spring.data.spanner.core.SpannerPageableQueryOptions
- All Implemented Interfaces:
Serializable
Encapsulates Cloud Spanner query options with sort and paging.
- 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) getLimit()
org.springframework.data.domain.Sort
getSort()
setAllowPartialRead
(boolean allowPartialRead) setIncludeProperties
(Set<String> includeProperties) setSort
(org.springframework.data.domain.Sort sort) 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
-
SpannerPageableQueryOptions
public SpannerPageableQueryOptions()
-
-
Method Details
-
getLimit
-
setLimit
-
getOffset
-
setOffset
-
getSort
public org.springframework.data.domain.Sort getSort() -
setSort
-
addQueryOption
public SpannerPageableQueryOptions addQueryOption(com.google.cloud.spanner.Options.QueryOption queryOption) - Overrides:
addQueryOption
in classSpannerQueryOptions
-
setIncludeProperties
- Overrides:
setIncludeProperties
in classSpannerQueryOptions
-
setTimestampBound
public SpannerPageableQueryOptions 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 classSpannerQueryOptions
- Parameters:
timestampBound
- the timestamp bound. Can be exact or bounded staleness.- Returns:
- this options object.
-
setTimestamp
- Overrides:
setTimestamp
in classSpannerQueryOptions
-
setAllowPartialRead
- Overrides:
setAllowPartialRead
in classSpannerQueryOptions
-