com.datastax.driver.core.querybuilder
Class Select

java.lang.Object
  extended by com.datastax.driver.core.Statement
      extended by com.datastax.driver.core.RegularStatement
          extended by com.datastax.driver.core.querybuilder.BuiltStatement
              extended by com.datastax.driver.core.querybuilder.Select

public class Select
extends BuiltStatement

A built SELECT statement.


Nested Class Summary
static class Select.Builder
          An in-construction SELECT statement.
static class Select.Selection
          An Selection clause for an in-construction SELECT statement.
static class Select.SelectionOrAlias
          An Selection clause for an in-construction SELECT statement.
static class Select.Where
          The WHERE clause of a SELECT statement.
 
Method Summary
 Select allowFiltering()
          Adds an ALLOW FILTERING directive to this statement.
 Select limit(BindMarker marker)
          Adds a prepared LIMIT clause to this statement.
 Select limit(int limit)
          Adds a LIMIT clause to this statement.
 Select orderBy(Ordering... orderings)
          Adds an ORDER BY clause to this statement.
 Select.Where where()
          Returns a Where statement for this query without adding clause.
 Select.Where where(Clause clause)
          Adds a WHERE clause to this statement.
 
Methods inherited from class com.datastax.driver.core.querybuilder.BuiltStatement
getKeyspace, getQueryString, getRoutingKey, getValues, setForceNoValues, toString
 
Methods inherited from class com.datastax.driver.core.Statement
disableTracing, enableTracing, getConsistencyLevel, getFetchSize, getRetryPolicy, getSerialConsistencyLevel, isTracing, setConsistencyLevel, setFetchSize, setRetryPolicy, setSerialConsistencyLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

where

public Select.Where where(Clause clause)
Adds a WHERE clause to this statement. This is a shorter/more readable version for where().and(clause).

Parameters:
clause - the clause to add.
Returns:
the where clause of this query to which more clause can be added.

where

public Select.Where where()
Returns a Where statement for this query without adding clause.

Returns:
the where clause of this query to which more clause can be added.

orderBy

public Select orderBy(Ordering... orderings)
Adds an ORDER BY clause to this statement.

Parameters:
orderings - the orderings to define for this query.
Returns:
this statement.
Throws:
IllegalStateException - if an ORDER BY clause has already been provided.

limit

public Select limit(int limit)
Adds a LIMIT clause to this statement.

Parameters:
limit - the limit to set.
Returns:
this statement.
Throws:
IllegalArgumentException - if limit &gte; 0.
IllegalStateException - if a LIMIT clause has already been provided.

limit

public Select limit(BindMarker marker)
Adds a prepared LIMIT clause to this statement.

Parameters:
marker - the marker to use for the limit.
Returns:
this statement.
Throws:
IllegalStateException - if a LIMIT clause has already been provided.

allowFiltering

public Select allowFiltering()
Adds an ALLOW FILTERING directive to this statement.

Returns:
this statement.


Copyright © 2014. All rights reserved.