org.axiondb.engine.commands
Class SelectCommand

java.lang.Object
  extended by org.axiondb.engine.commands.BaseAxionCommand
      extended by org.axiondb.engine.commands.SelectCommand
All Implemented Interfaces:
AxionCommand
Direct Known Subclasses:
SubSelectCommand

public class SelectCommand
extends BaseAxionCommand

A SELECT query.

TODO: Support for GROUP BY ...HAVING

Version:
$Revision: 1.91 $ $Date: 2004/09/09 23:47:43 $

Field Summary
protected  AxionQueryContext _context
           
protected  Database _currentDatabase
           
protected  AxionQueryPlanner _planner
           
 
Constructor Summary
SelectCommand(AxionQueryContext context)
           
 
Method Summary
protected  void buildTableList(Database db)
           
 boolean execute(Database database)
          Executes an SQL statement that may return multiple results.
 AxionResultSet executeQuery(Database db)
          Execute this command, returning a ResultSet.
 int executeUpdate(Database database)
          Unsupported
protected  Iterator getBindVariableIterator()
          Returns an Iteratorover all my BindVariables, in the proper order.
 Map getColumnIdToFieldMap()
           
 AxionQueryContext getQueryContext()
           
 RowIterator makeRowIterator(Database db)
           
protected  RowIterator makeRowIterator(Database db, boolean refresh)
           
protected  void resolve(Database db)
           
 String toString()
           
 
Methods inherited from class org.axiondb.engine.commands.BaseAxionCommand
appendBindVariables, assertNotReadOnly, attemptToConvertValue, bind, clearBindings, getEffectedRowCount, getResultSet, getRowIterator, getRowIterator, getTableForIdentifier, resolveSelectableList, resolveSelectableList, setEffectedRowCount, setResultSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_context

protected AxionQueryContext _context

_currentDatabase

protected Database _currentDatabase

_planner

protected AxionQueryPlanner _planner
Constructor Detail

SelectCommand

public SelectCommand(AxionQueryContext context)
Method Detail

execute

public boolean execute(Database database)
                throws AxionException
Description copied from interface: AxionCommand
Executes an SQL statement that may return multiple results.

Returns:
true if one or more ResultSets were generated, false otherwise
Throws:
AxionException
See Also:
Statement.execute(java.lang.String), PreparedStatement.execute()

executeQuery

public AxionResultSet executeQuery(Database db)
                            throws AxionException
Execute this command, returning a ResultSet.

Returns:
the ResultSetgenerated by this command.
Throws:
AxionException
See Also:
Statement.executeQuery(java.lang.String), PreparedStatement.executeQuery()

executeUpdate

public int executeUpdate(Database database)
                  throws AxionException
Unsupported

Returns:
the number of rows modified
Throws:
AxionException
See Also:
Statement.executeUpdate(java.lang.String), PreparedStatement.executeUpdate()

getColumnIdToFieldMap

public Map getColumnIdToFieldMap()

getQueryContext

public AxionQueryContext getQueryContext()

makeRowIterator

public RowIterator makeRowIterator(Database db)
                            throws AxionException
Throws:
AxionException

toString

public String toString()
Overrides:
toString in class Object

buildTableList

protected void buildTableList(Database db)
                       throws AxionException
Throws:
AxionException

getBindVariableIterator

protected Iterator getBindVariableIterator()
Description copied from class: BaseAxionCommand
Returns an Iteratorover all my BindVariables, in the proper order. Default impl returns empty iterator.

Overrides:
getBindVariableIterator in class BaseAxionCommand

makeRowIterator

protected RowIterator makeRowIterator(Database db,
                                      boolean refresh)
                               throws AxionException
Throws:
AxionException

resolve

protected void resolve(Database db)
                throws AxionException
Throws:
AxionException