public class FlatTableRowSliceQueryGen
extends java.lang.Object
FlatTableRowQueryGen this class encapsulates the functionality for row query generation for
Astyanax RowSliceQuery(s).
The class uses a collection of query generators to handle all sort of RowSliceQuery permutations like
1. Selecting all columns for a row collection
2. Selecting a column set for a row collection
3. Selecting all columns for a row range
4. Selecting a column set for a row range
Note that this class supports query generation for flat tables only.
For tables with clustering keys see CFRowKeysQueryGen and CFRowRangeQueryGen.
Also, just like the other query generators, use this with caution when using caching of PreparedStatement
See FlatTableRowQueryGen for a detailed explanation of why PreparedStatement caching will not work for queries
that do not have the same signatures.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String[] |
allPrimayKeyCols |
protected static java.lang.String |
BIND_MARKER |
protected CqlColumnFamilyDefinitionImpl |
cfDef |
protected java.lang.String |
keyspace |
protected java.lang.String |
partitionKeyCol |
protected java.util.List<com.netflix.astyanax.ddl.ColumnDefinition> |
regularCols |
protected java.util.concurrent.atomic.AtomicReference<com.datastax.driver.core.Session> |
sessionRef |
| Constructor and Description |
|---|
FlatTableRowSliceQueryGen(com.datastax.driver.core.Session session,
java.lang.String keyspaceName,
CqlColumnFamilyDefinitionImpl cfDefinition) |
| Modifier and Type | Method and Description |
|---|---|
com.datastax.driver.core.BoundStatement |
getQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery,
boolean useCaching) |
com.datastax.driver.core.BoundStatement |
getRowKeysQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery,
boolean useCaching) |
com.datastax.driver.core.BoundStatement |
getRowRangeQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery,
boolean useCaching) |
protected com.datastax.driver.core.querybuilder.Select |
selectAllColumnsFromKeyspaceAndCF()
SOME BASIC UTILITY METHODS USED BY ALL THE ROW SLICE QUERY GENERATORS
|
protected java.util.concurrent.atomic.AtomicReference<com.datastax.driver.core.Session> sessionRef
protected final java.lang.String keyspace
protected final CqlColumnFamilyDefinitionImpl cfDef
protected final java.lang.String partitionKeyCol
protected final java.lang.String[] allPrimayKeyCols
protected final java.util.List<com.netflix.astyanax.ddl.ColumnDefinition> regularCols
protected static final java.lang.String BIND_MARKER
public FlatTableRowSliceQueryGen(com.datastax.driver.core.Session session,
java.lang.String keyspaceName,
CqlColumnFamilyDefinitionImpl cfDefinition)
protected com.datastax.driver.core.querybuilder.Select selectAllColumnsFromKeyspaceAndCF()
public com.datastax.driver.core.BoundStatement getQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery, boolean useCaching)
public com.datastax.driver.core.BoundStatement getRowKeysQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery, boolean useCaching)
public com.datastax.driver.core.BoundStatement getRowRangeQueryStatement(CqlRowSliceQueryImpl<?,?> rowSliceQuery, boolean useCaching)