com.caucho.db.sql
Class SelectQuery

java.lang.Object
  extended by com.caucho.db.sql.Query
      extended by com.caucho.db.sql.SelectQuery
Direct Known Subclasses:
ExistsQuery

public class SelectQuery
extends Query


Field Summary
 
Fields inherited from class com.caucho.db.sql.Query
_whereExpr
 
Method Summary
protected  void bind()
          Binds the query.
 void execute(QueryContext context, DbTransaction xa)
          Executes the query.
 SelectCursor executeCursor(QueryContext context, DbTransaction xa)
          Executes the query.
 boolean isSelect()
          Returns true for select queries.
 boolean nextCursor(TableIterator[] rows, QueryContext context, DbTransaction xa)
          Executes the query.
 void setGroupResult(int index)
          Sets the result item as group.
 void setLimit(int limit)
          Sets the maximum entires
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.db.sql.Query
bind, freeRows, generateWhere, getDatabase, getDataFields, getFromItems, getParamExprs, getParent, getSubSelect, getWhereExprs, isGroup, isReadOnly, nextTuple, setDataFields, setFromItems, setFromItems, setGroup, setParams, setParent, setSubSelect, setWhereExpr, setWhereExprs, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setGroupResult

public void setGroupResult(int index)
Sets the result item as group.


bind

protected void bind()
             throws java.sql.SQLException
Description copied from class: Query
Binds the query.

Overrides:
bind in class Query
Throws:
java.sql.SQLException

setLimit

public void setLimit(int limit)
Description copied from class: Query
Sets the maximum entires

Overrides:
setLimit in class Query

isSelect

public boolean isSelect()
Returns true for select queries.

Overrides:
isSelect in class Query

execute

public void execute(QueryContext context,
                    DbTransaction xa)
             throws java.sql.SQLException
Executes the query.

Specified by:
execute in class Query
Throws:
java.sql.SQLException

executeCursor

public SelectCursor executeCursor(QueryContext context,
                                  DbTransaction xa)
                           throws java.sql.SQLException
Executes the query.

Overrides:
executeCursor in class Query
Throws:
java.sql.SQLException

nextCursor

public final boolean nextCursor(TableIterator[] rows,
                                QueryContext context,
                                DbTransaction xa)
                         throws java.sql.SQLException
Executes the query.

Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object