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

Fields
`static int` `MAX_COLUMNS_DEFAULT`

### Constructor Summary

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

### Method Summary

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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,
                    boolean firstSet)

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
  `wildcard` - determines weather this statement is wildcard
  `firstSet` - determines weather "FIRST" keyword was set

#### SelectExpression

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

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
  `firstSet` - determines weather "FIRST" keyword was set

### 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)

#### hasFirstSet

    public boolean hasFirstSet()

Returns:
  weather expression includes "FIRST" keyword

#### getStart

    public Term getStart()

#### getFinish

    public Term getFinish()

#### getColumns

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

#### isWildcard

    public boolean isWildcard()

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`