public class CqlColumnCountQueryImpl
extends java.lang.Object
implements com.netflix.astyanax.query.ColumnCountQuery
ColumnCountQuery
Note that since this query essentially derives itself from the RowQuery interface, it also uses the statement
constructed by the CqlRowQueryImpl class. The difference in functionality is in how the records form the result set
are parsed. Here we look at the number of rows returned for the same row key.
Note that since CQL3 can treat columns as rows
(depending on the schema), we look for multiple rows with the same row keys. If there are multiple rows, then we count the number
of rows for each unique row key. If there is just one row and the schema definition is like a flat table, then we just count the actual no of data columns returned
in the result set.
See CqlRowQueryImpl for more details on how the query is actually constructed| Constructor and Description |
|---|
CqlColumnCountQueryImpl(CqlKeyspaceImpl.KeyspaceContext ksCtx,
CFQueryContext<?,?> cfCtx,
com.datastax.driver.core.Statement query) |
| Modifier and Type | Method and Description |
|---|---|
com.netflix.astyanax.connectionpool.OperationResult<java.lang.Integer> |
execute() |
com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Integer>> |
executeAsync() |
public CqlColumnCountQueryImpl(CqlKeyspaceImpl.KeyspaceContext ksCtx, CFQueryContext<?,?> cfCtx, com.datastax.driver.core.Statement query)
public com.netflix.astyanax.connectionpool.OperationResult<java.lang.Integer> execute()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
execute in interface com.netflix.astyanax.Execution<java.lang.Integer>com.netflix.astyanax.connectionpool.exceptions.ConnectionExceptionpublic com.google.common.util.concurrent.ListenableFuture<com.netflix.astyanax.connectionpool.OperationResult<java.lang.Integer>> executeAsync()
throws com.netflix.astyanax.connectionpool.exceptions.ConnectionException
executeAsync in interface com.netflix.astyanax.Execution<java.lang.Integer>com.netflix.astyanax.connectionpool.exceptions.ConnectionException