net.sf.saffron.sql
Class SqlDelete
java.lang.Object
|
+--net.sf.saffron.sql.SqlNode
|
+--net.sf.saffron.sql.SqlCall
|
+--net.sf.saffron.sql.SqlDelete
- public class SqlDelete
- extends SqlCall
A SqlDelete
is a node of a parse tree which represents
a DELETE statement.
TARGET_TABLE_OPERAND
public static final int TARGET_TABLE_OPERAND
- See Also:
- Constant Field Values
CONDITION_OPERAND
public static final int CONDITION_OPERAND
- See Also:
- Constant Field Values
SOURCE_SELECT_OPERAND
public static final int SOURCE_SELECT_OPERAND
- See Also:
- Constant Field Values
OPERAND_COUNT
public static final int OPERAND_COUNT
- See Also:
- Constant Field Values
SqlDelete
public SqlDelete(SqlSpecialOperator operator,
SqlIdentifier targetTable,
SqlNode condition)
getTargetTable
public SqlIdentifier getTargetTable()
- .
- Returns:
- the identifier for the target table of the insertion
getSourceSelect
public SqlSelect getSourceSelect()
- Get the source SELECT expression for the data to be inserted. It is
only safe to call this after the condition has been expanded
by SqlValidator.createInternalSelect.
- Returns:
- the source SELECT for the data to be inserted
getCondition
public SqlCall getCondition()
- Get the filter condition for rows to be deleted. It is only safe to
call this before the condition has been expanded by
SqlValidator.createInternalSelect.
- Returns:
- the condition expression for the data to be deleted, or null for
all rows in the table
unparse
public void unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
- Description copied from class:
SqlNode
- Writes a SQL representation of this node to a writer.
- Overrides:
unparse
in class SqlCall