org.axiondb.engine.commands
Class SubSelectCommand
java.lang.Object
org.axiondb.engine.commands.BaseAxionCommand
org.axiondb.engine.commands.SelectCommand
org.axiondb.engine.commands.SubSelectCommand
- All Implemented Interfaces:
- Serializable, AxionCommand, Selectable
public class SubSelectCommand
- extends SelectCommand
- implements Selectable
A Sub SELECT query used for view, scalar value, from node, row list
- Version:
- $Revision: 1.6 $ $Date: 2004/09/09 23:47:43 $
- See Also:
- Serialized Form
Methods inherited from class org.axiondb.engine.commands.BaseAxionCommand |
appendBindVariables, assertNotReadOnly, attemptToConvertValue, bind, clearBindings, getEffectedRowCount, getResultSet, getRowIterator, getRowIterator, getTableForIdentifier, resolveSelectableList, resolveSelectableList, setEffectedRowCount, setResultSet |
SubSelectCommand
public SubSelectCommand(AxionQueryContext context)
evaluate
public Object evaluate(RowDecorator row)
throws AxionException
- Specified by:
evaluate
in interface Selectable
- Throws:
AxionException
execute
public boolean execute(Database database)
throws AxionException
- Description copied from interface:
AxionCommand
- Executes an SQL statement that may return multiple results.
- Specified by:
execute
in interface AxionCommand
- Overrides:
execute
in class SelectCommand
- Returns:
- true if one or more
ResultSet
s
were generated, false otherwise
- Throws:
AxionException
- See Also:
Statement.execute(java.lang.String)
,
PreparedStatement.execute()
executeQuery
public AxionResultSet executeQuery(Database db)
throws AxionException
- Description copied from class:
SelectCommand
- Execute this command, returning a
ResultSet
.
- Specified by:
executeQuery
in interface AxionCommand
- Overrides:
executeQuery
in class SelectCommand
- Returns:
- the
ResultSet
generated by this command.
- Throws:
AxionException
- See Also:
Statement.executeQuery(java.lang.String)
,
PreparedStatement.executeQuery()
executeUpdate
public int executeUpdate(Database database)
throws AxionException
- Description copied from class:
SelectCommand
- Unsupported
- Specified by:
executeUpdate
in interface AxionCommand
- Overrides:
executeUpdate
in class SelectCommand
- Returns:
- the number of rows modified
- Throws:
AxionException
- See Also:
Statement.executeUpdate(java.lang.String)
,
PreparedStatement.executeUpdate()
getAlias
public String getAlias()
- Specified by:
getAlias
in interface Selectable
getDataType
public DataType getDataType()
- Specified by:
getDataType
in interface Selectable
getLabel
public String getLabel()
- Specified by:
getLabel
in interface Selectable
getName
public String getName()
- Specified by:
getName
in interface Selectable
getRowIterator
public RowIterator getRowIterator(Database db)
throws AxionException
- Return RowIterator that can used for other commands for sub-query.
- Returns:
- the
RowIterator
.
- Throws:
AxionException
getRowIterator
public RowIterator getRowIterator(Database db,
RowDecorator rowDec)
throws AxionException
- Throws:
AxionException
getTableView
public Table getTableView(Database db,
String name)
throws AxionException
- Return TableView a table wrapper to hold sub-query RowIterator.
- Returns:
- the
TableView
.
- Throws:
AxionException
getUpdatableTableView
public Table getUpdatableTableView(Database db)
throws AxionException
- Throws:
AxionException
getUpdatableTableView
public Table getUpdatableTableView(Database db,
String name)
throws AxionException
- Throws:
AxionException
isScalarSelect
public boolean isScalarSelect()
makeRowIterator
public RowIterator makeRowIterator(Database db)
throws AxionException
- Overrides:
makeRowIterator
in class SelectCommand
- Throws:
AxionException
setAlias
public void setAlias(String aliasName)
setDB
public void setDB(Database db)
setEvaluteAsScalarValue
public void setEvaluteAsScalarValue()
setParentTables
public void setParentTables(TableIdentifier[] tables)
setVariableContext
public void setVariableContext(VariableContext context)
- Specified by:
setVariableContext
in interface Selectable
buildTableList
protected void buildTableList(Database db)
throws AxionException
- Overrides:
buildTableList
in class SelectCommand
- Throws:
AxionException