|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlSelectOperator
public class SqlSelectOperator
An operator describing a query. (Not a query itself.)
Operands are:
SqlLiteral)SqlNodeList)SqlCall to "join" operator)SqlNode)SqlNode)SqlNode)SqlNodeList)SqlNode)
| Field Summary |
|---|
| Fields inherited from class org.eigenbase.sql.SqlOperator |
|---|
MaxPrec, NL |
| Constructor Summary | |
|---|---|
SqlSelectOperator()
|
|
| Method Summary | ||
|---|---|---|
|
acceptCall(SqlVisitor<R> visitor,
SqlCall call,
boolean onlyExpressions,
SqlBasicVisitor.ArgHandler<R> argHandler)
Accepts a SqlVisitor, directing an SqlBasicVisitor.ArgHandler to visit operand of a
call. |
|
boolean |
argumentMustBeScalar(int ordinal)
Returns whether the ordinalth argument to this operator must
be scalar (as opposed to a query). |
|
SqlCall |
createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands)
Creates a call to this operand with an array of operands. |
|
SqlSelect |
createCall(SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode fromClause,
SqlNode whereClause,
SqlNode groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNode orderBy,
SqlParserPos pos)
Creates a call to the SELECT operator. |
|
SqlSyntax |
getSyntax()
Returns the syntactic type of this operator. |
|
void |
unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SqlSelectOperator()
| Method Detail |
|---|
public SqlSyntax getSyntax()
SqlOperator
getSyntax in class SqlOperator
public SqlCall createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands)
SqlOperatorThe position of the resulting call is the union of the
pos and the positions of all of the operands.
createCall in class SqlOperatorfunctionQualifier - function qualifier (e.g. "DISTINCT"), may bepos - parser position of the identifier of the calloperands - array of operands
public SqlSelect createCall(SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode fromClause,
SqlNode whereClause,
SqlNode groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNode orderBy,
SqlParserPos pos)
SELECT operator.
keywordList - List of keywords such DISTINCT and ALL, or nullselectList - The SELECT clause, or null if emptyfromClause - The FROM clausewhereClause - The WHERE clause, or null if not presentgroupBy - The GROUP BY clause, or null if not presenthaving - The HAVING clause, or null if not presentwindowDecls - The WINDOW clause, or null if not presentorderBy - The ORDER BY clause, or null if not presentpos - The parser position, or SqlParserPos.ZERO if not
specified; must not be null.
SqlSelect, never null
public <R> void acceptCall(SqlVisitor<R> visitor,
SqlCall call,
boolean onlyExpressions,
SqlBasicVisitor.ArgHandler<R> argHandler)
SqlOperatorSqlVisitor, directing an SqlBasicVisitor.ArgHandler to visit operand of a
call. The argument handler allows fine control about how the operands are
visited, and how the results are combined.
acceptCall in class SqlOperatorvisitor - Visitorcall - Call to visitonlyExpressions - If true, ignores operands which are not
expressions. For example, in the call to the AS operatorargHandler - Called for each operand
public void unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
SqlOperatorThe default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int).
unparse in class SqlOperatorpublic boolean argumentMustBeScalar(int ordinal)
SqlOperatorordinalth argument to this operator must
be scalar (as opposed to a query).
If true (the default), the validator will attempt to convert the argument into a scalar subquery, which must have one column and return at most one row.
Operators such as SELECT and EXISTS override
this method.
argumentMustBeScalar in class SqlOperator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||