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.


Nested Class Summary
 
Nested classes inherited from class net.sf.saffron.sql.SqlNode
SqlNode.DatabaseMetaDataInvocationHandler
 
Field Summary
static int CONDITION_OPERAND
           
static int OPERAND_COUNT
           
static int SOURCE_SELECT_OPERAND
           
static int TARGET_TABLE_OPERAND
           
 
Fields inherited from class net.sf.saffron.sql.SqlCall
operands, operator
 
Constructor Summary
SqlDelete(SqlSpecialOperator operator, SqlIdentifier targetTable, SqlNode condition)
           
 
Method Summary
 SqlCall getCondition()
          Get the filter condition for rows to be deleted.
 SqlSelect getSourceSelect()
          Get the source SELECT expression for the data to be inserted.
 SqlIdentifier getTargetTable()
          .
 void unparse(SqlWriter writer, int leftPrec, int rightPrec)
          Writes a SQL representation of this node to a writer.
 
Methods inherited from class net.sf.saffron.sql.SqlCall
addOperand, clone, getKind, getOperands, isA, setOperand
 
Methods inherited from class net.sf.saffron.sql.SqlNode
cloneArray, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

SqlDelete

public SqlDelete(SqlSpecialOperator operator,
                 SqlIdentifier targetTable,
                 SqlNode condition)
Method Detail

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

SourceForge.net_Logo