SelectExpression (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.cql
Class SelectExpression

    java.lang.Object
      org.apache.cassandra.cql.SelectExpression

    public class SelectExpression

extends java.lang.Object

Select expressions are analogous to the projection in a SQL query. They determine which columns will appear in the result set. SelectExpression instances encapsulate a parsed expression from a `SELECT` statement. See: doc/cql/CQL.html#SpecifyingColumns

Field Summary
`static int` | `MAX_COLUMNS_DEFAULT`

Constructor Summary
`SelectExpression(Term first, int count, boolean reverse)` Create a new SelectExpression for a list of columns.
`SelectExpression(Term start, Term finish, int count, boolean reverse, boolean wildcard)` Create a new SelectExpression for a range (slice) of columns.

Method Summary
`void` | `and(Term addTerm)` Add an additional column name to a SelectExpression.
`java.util.List<Term>` | `getColumns()`
`int` | `getColumnsLimit()`
`Term` | `getFinish()`
`Term` | `getStart()`
`boolean` | `isColumnList()`
`boolean` | `isColumnRange()`
`boolean` | `isColumnsReversed()`
`boolean` | `isWildcard()`
`void` | `setColumnsLimit(int limit)`
`void` | `setColumnsReversed(boolean reversed)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAX_COLUMNS_DEFAULT

    public static final int MAX_COLUMNS_DEFAULT

See Also:
  Constant Field Values

Constructor Detail

### SelectExpression

    public SelectExpression(Term start,
                            Term finish,
                            int count,
                            boolean reverse,
                            boolean wildcard)

  Create a new SelectExpression for a range (slice) of columns.

  Parameters:
    `start` - the starting column name
    `finish` - the finishing column name
    `count` - the number of columns to limit the results to
    `reverse` - true to reverse column order

### SelectExpression

    public SelectExpression(Term first,
                            int count,
                            boolean reverse)

  Create a new SelectExpression for a list of columns.

  Parameters:
    `first` - the first (possibly only) column name to select on.
    `count` - the number of columns to limit the results on
    `reverse` - true to reverse column order

Method Detail

### and

    public void and(Term addTerm)

  Add an additional column name to a SelectExpression.

  Parameters:
    `addTerm` -

### isColumnRange

    public boolean isColumnRange()

### isColumnList

    public boolean isColumnList()

### getColumnsLimit

    public int getColumnsLimit()

### isColumnsReversed

    public boolean isColumnsReversed()

### setColumnsReversed

    public void setColumnsReversed(boolean reversed)

### setColumnsLimit

    public void setColumnsLimit(int limit)

### getStart

    public Term getStart()

### getFinish

    public Term getFinish()

### getColumns

    public java.util.List<Term> getColumns()

### isWildcard

    public boolean isWildcard()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation