|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.SqlNode
org.eigenbase.sql.SqlCall
org.eigenbase.sql.SqlDelete
public class SqlDelete
A SqlDelete is a node of a parse tree which represents a DELETE
statement.
| Field Summary | |
|---|---|
static int |
ALIAS_OPERAND
|
static int |
CONDITION_OPERAND
|
static int |
OPERAND_COUNT
|
static int |
SOURCE_SELECT_OPERAND
|
static int |
TARGET_TABLE_OPERAND
|
| Fields inherited from class org.eigenbase.sql.SqlCall |
|---|
operands |
| Fields inherited from class org.eigenbase.sql.SqlNode |
|---|
emptyArray |
| Constructor Summary | |
|---|---|
SqlDelete(SqlSpecialOperator operator,
SqlIdentifier targetTable,
SqlNode condition,
SqlIdentifier alias,
SqlParserPos pos)
|
|
| Method Summary | |
|---|---|
SqlIdentifier |
getAlias()
|
SqlNode |
getCondition()
Gets the filter condition for rows to be deleted. |
SqlSelect |
getSourceSelect()
Gets the source SELECT expression for the data to be deleted. |
SqlIdentifier |
getTargetTable()
|
void |
unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
Writes a SQL representation of this node to a writer. |
void |
validate(SqlValidator validator,
SqlValidatorScope scope)
Validates this call. |
| Methods inherited from class org.eigenbase.sql.SqlCall |
|---|
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getKind, getMonotonicity, getOperands, getOperator, isA, isCountStar, isExpanded, isName, setOperand, setOperator |
| Methods inherited from class org.eigenbase.sql.SqlNode |
|---|
clone, cloneArray, equalDeep, getParserPosition, toSqlString, toSqlString, toString, validateExpr |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TARGET_TABLE_OPERAND
public static final int CONDITION_OPERAND
public static final int SOURCE_SELECT_OPERAND
public static final int ALIAS_OPERAND
public static final int OPERAND_COUNT
| Constructor Detail |
|---|
public SqlDelete(SqlSpecialOperator operator,
SqlIdentifier targetTable,
SqlNode condition,
SqlIdentifier alias,
SqlParserPos pos)
| Method Detail |
|---|
public SqlIdentifier getTargetTable()
public SqlIdentifier getAlias()
public SqlNode getCondition()
public SqlSelect getSourceSelect()
public void unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
SqlNodeThe leftPrec and rightPrec parameters give
us enough context to decide whether we need to enclose the expression in
parentheses. For example, we need parentheses around "2 + 3" if preceded
by "5 *". This is because the precedence of the "*" operator is greater
than the precedence of the "+" operator.
The algorithm handles left- and right-associative operators by giving them slightly different left- and right-precedence.
If SqlWriter.isAlwaysUseParentheses() is true, we use
parentheses even when they are not required by the precedence rules.
For the details of this algorithm, see SqlCall.unparse(org.eigenbase.sql.SqlWriter, int, int).
unparse in class SqlCallwriter - Target writerleftPrec - The precedence of the SqlNode immediately
preceding this node in a depth-first scan of the parse treerightPrec - The precedence of the SqlNode immediately
public void validate(SqlValidator validator,
SqlValidatorScope scope)
SqlCallThe default implementation delegates the validation to the operator's
SqlOperator.validateCall(org.eigenbase.sql.SqlCall, org.eigenbase.sql.validate.SqlValidator, org.eigenbase.sql.validate.SqlValidatorScope, org.eigenbase.sql.validate.SqlValidatorScope). Derived classes may override (as do,
for example SqlSelect and SqlUpdate).
validate in class SqlCallscope - Validator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||