|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.TCustomSqlStatement
gudusoft.gsqlparser.stmt.TSelectSqlStatement
public class TSelectSqlStatement
A query specifies a result table. A query is a component of certain SQL statements.
The three forms of a query are:
This class represents all three above forms of a query.
subselect
The subselect is a component of the fullselect.
A subselect specifies a result table derived from the tables, views or nicknames identified in the FROM clause.
The clauses of the subselect are processed in the following sequence:
A subselect that contains an ORDER BY or FETCH FIRST clause cannot be specified:
Syntax:
select-clause from-clause [where-clause] [group-by-clause] [having-clause] [order-by-clause]
fullselect
The fullselect is a component of the select-statement, the INSERT statement, and the CREATE VIEW statement.
It is also a component of certain predicates which, in turn, are components of a statement.
A fullselect that is a component of a predicate is called a subquery, and a fullselect that is enclosed in parentheses is sometimes called a subquery.
The set operators UNION, EXCEPT, and INTERSECT correspond to the relational operators union, difference, and intersection.
A fullselect specifies a result table. If a set operator is not used,the result of the fullselect is the result of the specified subselect or values-clause.
Syntax:
{subselect|(fullselect)|values-clause}[UNION|UNION ALL|EXCEPT|EXCEPT ALL|INTERSECT|INTERSECT ALL {subselect|(fullselect)|values-clause}][,...n] [order-by-clause]
select-statement
The select-statement is the form of a query that can be directly specified in a DECLARE CURSOR statement, or prepared and then referenced in a DECLARE CURSOR statement.
the table specified by a select-statement is the result of the fullselect.
Syntax:
[WITH common-table-expression] fullselect [update-clause]
Field Summary | |
---|---|
static int |
setOperator_except
|
static int |
setOperator_exceptall
|
static int |
setOperator_intersect
|
static int |
setOperator_intersectall
|
static int |
setOperator_minus
|
static int |
setOperator_minusall
|
static int |
setOperator_none
|
static int |
setOperator_union
|
static int |
setOperator_unionall
|
Fields inherited from class gudusoft.gsqlparser.TCustomSqlStatement |
---|
dbvendor, dummytag, joins, parser, plsqlparser, rootNode, sourcetokenlist, sqlstatementtype, tables |
Constructor Summary | |
---|---|
TSelectSqlStatement(EDbVendor dbvendor)
|
Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode |
---|
addAllMyTokensToTokenList, doParse, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, init, init, setDummyTag, setEndToken, setEndToken, setGsqlparser, setNodeType, setStartToken, setStartToken, setString, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int setOperator_none
public static final int setOperator_union
public static final int setOperator_unionall
public static final int setOperator_intersect
public static final int setOperator_intersectall
public static final int setOperator_minus
public static final int setOperator_minusall
public static final int setOperator_except
public static final int setOperator_exceptall
Constructor Detail |
---|
public TSelectSqlStatement(EDbVendor dbvendor)
Method Detail |
---|
public void setSelectToken(TSourceToken selectToken)
public TSourceToken getSelectToken()
public TWindowClause getWindowClause()
public TPTNodeList<TLockingClause> getLockingClauses()
public TSelectDistinct getSelectDistinct()
public TIntoClause getIntoClause()
public TOrderBy getOrderbyClause()
public TQualifyClause getQualifyClause()
public TTeradataWithClause getTeradataWithClause()
public TSampleClause getSampleClause()
public TForUpdate getForUpdateClause()
public TComputeClause getComputeClause()
public TGroupBy getGroupByClause()
public THierarchical getHierarchicalClause()
public TLimitClause getLimitClause()
public TExpandOnClause getExpandOnClause()
public int getSetOperator()
public TSelectSqlStatement getLeftStmt()
getSetOperator()
is not setOperator_none.
public TSelectSqlStatement getRightStmt()
getSetOperator()
is not setOperator_none.
public java.lang.String getOracleHint()
public TValueClause getValueClause()
public int doParseStatement(TCustomSqlStatement psql)
doParseStatement
in class TCustomSqlStatement
public boolean isCombinedQuery()
public void accept(TParseTreeVisitor v)
accept
in interface Visitable
accept
in class TParseTreeNode
public TOrderBy addOrderBy(java.lang.String orderByStr)
public TWhereClause addWhereClause(java.lang.String condition)
TCustomSqlStatement
addWhereClause
in class TCustomSqlStatement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |