Package org.apache.cassandra.db
Interface SinglePartitionReadQuery
- All Superinterfaces:
ReadQuery
- All Known Implementing Classes:
SinglePartitionReadCommand,SinglePartitionReadCommand.VirtualTableSinglePartitionReadCommand
A
ReadQuery for a single partition.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classGroups multiple single partition read queries. -
Method Summary
Modifier and TypeMethodDescriptionstatic SinglePartitionReadQuerycreate(TableMetadata metadata, long nowInSec, DecoratedKey key, ColumnFilter columnFilter, ClusteringIndexFilter filter) Creates a new read query on a single partition.static SinglePartitionReadQuerycreate(TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter) Creates a new read query on a single partition.static SinglePartitionReadQuery.Group<? extends SinglePartitionReadQuery>createGroup(TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, List<DecoratedKey> partitionKeys, ClusteringIndexFilter clusteringIndexFilter) forPaging(Clustering<?> lastReturned, DataLimits limits) Returns a newSinglePartitionReadQuerysuitable to paging from the last returned row.default SinglePartitionPagergetPager(PagingState pagingState, ProtocolVersion protocolVersion) Returns a pager for the query.Returns the key of the partition queried by thisReadQuerydefault booleanselectsClustering(DecoratedKey key, Clustering<?> clustering) default booleanselectsKey(DecoratedKey key) withUpdatedLimit(DataLimits newLimits) Creates a newSinglePartitionReadQuerywith the specified limits.Methods inherited from interface org.apache.cassandra.db.ReadQuery
columnFilter, dataRange, execute, executeInternal, executeLocally, executionController, isEmpty, isTopK, limits, maybeValidateIndex, metadata, nowInSec, rowFilter, selectsFullPartition, trackWarnings
-
Method Details
-
createGroup
static SinglePartitionReadQuery.Group<? extends SinglePartitionReadQuery> createGroup(TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, List<DecoratedKey> partitionKeys, ClusteringIndexFilter clusteringIndexFilter) -
create
static SinglePartitionReadQuery create(TableMetadata metadata, long nowInSec, DecoratedKey key, ColumnFilter columnFilter, ClusteringIndexFilter filter) Creates a new read query on a single partition.- Parameters:
metadata- the table to query.nowInSec- the time in seconds to use are "now" for this query.key- the partition key for the partition to query.columnFilter- the column filter to use for the query.filter- the clustering index filter to use for the query.- Returns:
- a newly created read query. The returned query will use no row filter and have no limits.
-
create
static SinglePartitionReadQuery create(TableMetadata metadata, long nowInSec, ColumnFilter columnFilter, RowFilter rowFilter, DataLimits limits, DecoratedKey partitionKey, ClusteringIndexFilter clusteringIndexFilter) Creates a new read query on a single partition.- Parameters:
metadata- the table to query.nowInSec- the time in seconds to use are "now" for this query.columnFilter- the column filter to use for the query.rowFilter- the row filter to use for the query.limits- the limits to use for the query.partitionKey- the partition key for the partition to query.clusteringIndexFilter- the clustering index filter to use for the query.- Returns:
- a newly created read query.
-
partitionKey
DecoratedKey partitionKey()Returns the key of the partition queried by thisReadQuery- Returns:
- the key of the partition queried
-
withUpdatedLimit
Creates a newSinglePartitionReadQuerywith the specified limits.- Parameters:
newLimits- the new limits- Returns:
- the new
SinglePartitionReadQuery
-
forPaging
Returns a newSinglePartitionReadQuerysuitable to paging from the last returned row.- Parameters:
lastReturned- the last row returned by the previous page. The newly created query will only query row that comes after this (in query order). This can benullif this is the first page.limits- the limits to use for the page to query.- Returns:
- the newly create query.
-
getPager
Description copied from interface:ReadQueryReturns a pager for the query. -
clusteringIndexFilter
ClusteringIndexFilter clusteringIndexFilter() -
selectsKey
- Specified by:
selectsKeyin interfaceReadQuery- Returns:
- true if the read query would select the given key, including checks against the row filter, if checkRowFilter is true
-
selectsClustering
- Specified by:
selectsClusteringin interfaceReadQuery- Returns:
- true if the read query would select the given clustering, including checks against the row filter, if checkRowFilter is true
-