org.eigenbase.sql
Class SqlKind

java.lang.Object
  extended by org.eigenbase.util14.Enum14.BasicValue
      extended by org.eigenbase.sql.SqlKind
All Implemented Interfaces:
Serializable, Comparable, Enum14.Value

public class SqlKind
extends Enum14.BasicValue

Enumerates the possible types of SqlNode.

Only commonly-used nodes have their own type; other nodes are of type Other. Some of the values, such as SetQuery, represent aggregates.

Since:
Dec 12, 2003
Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/SqlKind.java#30 $
Author:
jhyde
See Also:
Serialized Form

Field Summary
static SqlKind And
           
static int AndORDINAL
          And
static SqlKind As
           
static int AsORDINAL
          AS operator
static SqlKind Between
           
static int BetweenORDINAL
          Between
static SqlKind Case
           
static int CaseORDINAL
          CASE
static SqlKind Cast
           
static int CastORDINAL
          CAST
static SqlKind CollectionTable
           
static int CollectionTableORDINAL
          Table operator which converts user-defined transform into a relation, for example, select * from TABLE(udx(x, y, z)).
static SqlKind ColumnListConstructor
           
static int ColumnListConstructorORDINAL
          COLUMN_LIST constructor, for example, the ROW() call in select * from TABLE(udx(CURSOR(select ...), ROW(a, b, c, d), x, y, z))
static SqlKind Comparison
           
static int ComparisonORDINAL
          Comparison
static SqlKind CursorConstructor
           
static int CursorConstructorORDINAL
          CURSOR constructor, for example, select * from TABLE(udx(CURSOR(select ...), x, y, z))
static SqlKind Delete
           
static int DeleteORDINAL
          DELETE statement
static SqlKind Descending
           
static int DescendingORDINAL
          Descending
static SqlKind Divide
           
static int DivideORDINAL
          Divide
static SqlKind Dml
           
static int DmlORDINAL
          Dml is an aggregate of all DML operators.
static SqlKind Dot
           
static int DotORDINAL
          Dot
static SqlKind DynamicParam
           
static int DynamicParamORDINAL
          Dynamic Param
static EnumeratedValues enumeration
           
static SqlKind Equals
           
static int EqualsORDINAL
          Equals
static SqlKind Escape
           
static int EscapeORDINAL
          Escape operator (always part of LIKE or SIMILAR TO expression)
static SqlKind Except
           
static int ExceptORDINAL
          Except
static SqlKind Exists
           
static int ExistsORDINAL
          Exists
static SqlKind Explain
           
static int ExplainORDINAL
          EXPLAIN statement
static SqlKind ExplicitTable
           
static int ExplicitTableORDINAL
          ExplicitTable, e.g.
static SqlKind Expression
           
static int ExpressionORDINAL
          Expression is an aggregate of all expression operators.
static SqlKind Following
           
static int FollowingORDINAL
          FOLLOWING
static SqlKind Function
           
static int FunctionORDINAL
          Function
static SqlKind GreaterThan
           
static int GreaterThanORDINAL
          GreaterThan
static SqlKind GreaterThanOrEqual
           
static int GreaterThanOrEqualORDINAL
          GreaterThanOrEqual
static SqlKind Identifier
           
static int IdentifierORDINAL
          Identifier
static SqlKind In
           
static int InORDINAL
          In
static SqlKind Insert
           
static int InsertORDINAL
          INSERT statement
static SqlKind Intersect
           
static int IntersectORDINAL
          Intersect
static SqlKind IsFalse
           
static int IsFalseORDINAL
          IS FALSE
static SqlKind IsNull
           
static int IsNullORDINAL
          IS NULL
static SqlKind IsTrue
           
static int IsTrueORDINAL
          IS TRUE
static SqlKind IsUnknown
           
static int IsUnknownORDINAL
          IS UNKNOWN
static SqlKind JdbcFn
           
static int JdbcFnORDINAL
          Call to a function using JDBC function syntax.
static SqlKind Join
           
static int JoinORDINAL
          JOIN operator or compound FROM clause.
static SqlKind Lateral
           
static int LateralORDINAL
          Lateral
static SqlKind LessThan
           
static int LessThanORDINAL
          LessThan
static SqlKind LessThanOrEqual
           
static int LessThanOrEqualORDINAL
          LessThanOrEqual
static SqlKind Like
           
static int LikeORDINAL
          Like
static SqlKind Literal
           
static SqlKind LiteralChain
           
static int LiteralChainORDINAL
          LiteralChain operator (for composite string literals)
static int LiteralORDINAL
          Literal
static SqlKind Merge
           
static int MergeORDINAL
          MERGE statement
static SqlKind Minus
           
static int MinusORDINAL
          Minus
static SqlKind MinusPrefix
           
static int MinusPrefixORDINAL
          MinusPrefix
static SqlKind MultisetQueryConstructor
           
static int MultisetQueryConstructorORDINAL
          MultisetValueConstructor Query Constructor
static SqlKind MultisetValueConstructor
           
static int MultisetValueConstructorORDINAL
          MultisetValueConstructor Value Constructor
static SqlKind NewSpecification
           
static int NewSpecificationORDINAL
          NewSpecification
static SqlKind Not
           
static SqlKind NotEquals
           
static int NotEqualsORDINAL
          NotEquals
static int NotORDINAL
          Not
static SqlKind Or
           
static SqlKind OrderBy
           
static int OrderByORDINAL
           
static int OrORDINAL
          Or
static SqlKind Other
           
static int OtherORDINAL
          Other
static SqlKind Over
          OVER operator
static SqlKind Overlaps
           
static int OverlapsORDINAL
          Overlaps
static int OverORDINAL
           
static SqlKind Plus
           
static int PlusORDINAL
          Plus
static SqlKind PlusPrefix
           
static int PlusPrefixORDINAL
          PlusPrefix
static SqlKind Preceding
           
static int PrecedingORDINAL
          PRECEDING
static SqlKind ProcedureCall
           
static int ProcedureCallORDINAL
          ProcedureCall
static SqlKind Query
           
static int QueryORDINAL
          Query is an aggregate of query node types.
static SqlKind Reinterpret
           
static int ReinterpretORDINAL
          Reinterpret operator (a reinterpret cast)
static SqlKind Row
           
static int RowORDINAL
          ROW function
static SqlKind ScalarQuery
           
static int ScalarQueryORDINAL
          ScalarQuery is an aggregate of scalar query node types.
static SqlKind Select
           
static int SelectORDINAL
          SELECT statement or sub-query
static SqlKind SetQuery
           
static int SetQueryORDINAL
          SetQuery is an aggregate of set-query node types.
static SqlKind Similar
           
static int SimilarORDINAL
          Similar
static SqlKind TableSample
           
static int TableSampleORDINAL
          TABLESAMPLE operator
static SqlKind Times
           
static int TimesORDINAL
          Times
static SqlKind TopLevel
           
static int TopLevelORDINAL
          Aggregate of SQL statement types Query, Dml.
static SqlKind Trim
           
static int TrimORDINAL
          TRIM
static SqlKind Union
           
static int UnionORDINAL
          Union
static SqlKind Unnest
           
static int UnnestORDINAL
          Unnest
static SqlKind Update
           
static int UpdateORDINAL
          UPDATE statement
static SqlKind Values
           
static int ValuesORDINAL
          Values
static SqlKind Window
          Window specification
static int WindowORDINAL
           
 
Constructor Summary
private SqlKind(String name, int ordinal)
           
 
Method Summary
static SqlKind get(int ordinal)
          Looks up a kind from its ordinal.
static SqlKind get(String name)
          Looks up a kind from its name.
 boolean isA(SqlKind kind)
          Returns whether this kind is the same as a given kind, or is a member if the given kind is an aggregate
 
Methods inherited from class org.eigenbase.util14.Enum14.BasicValue
compareTo, equals, equals, getDescription, getName, getOrdinal, hashCode, toString, unexpected
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OtherORDINAL

public static final int OtherORDINAL
Other

See Also:
Constant Field Values

Other

public static final SqlKind Other

SelectORDINAL

public static final int SelectORDINAL
SELECT statement or sub-query

See Also:
Constant Field Values

Select

public static final SqlKind Select

JoinORDINAL

public static final int JoinORDINAL
JOIN operator or compound FROM clause.

A FROM clause with more than one table is represented as if it were a join. For example, "FROM x, y, z" is represented as "JOIN(x, JOIN(x, y))".

See Also:
Constant Field Values

Join

public static final SqlKind Join

IdentifierORDINAL

public static final int IdentifierORDINAL
Identifier

See Also:
Constant Field Values

Identifier

public static final SqlKind Identifier

LiteralORDINAL

public static final int LiteralORDINAL
Literal

See Also:
Constant Field Values

Literal

public static final SqlKind Literal

FunctionORDINAL

public static final int FunctionORDINAL
Function

See Also:
Constant Field Values

Function

public static final SqlKind Function

ExplainORDINAL

public static final int ExplainORDINAL
EXPLAIN statement

See Also:
Constant Field Values

Explain

public static final SqlKind Explain

InsertORDINAL

public static final int InsertORDINAL
INSERT statement

See Also:
Constant Field Values

Insert

public static final SqlKind Insert

DeleteORDINAL

public static final int DeleteORDINAL
DELETE statement

See Also:
Constant Field Values

Delete

public static final SqlKind Delete

UpdateORDINAL

public static final int UpdateORDINAL
UPDATE statement

See Also:
Constant Field Values

Update

public static final SqlKind Update

DynamicParamORDINAL

public static final int DynamicParamORDINAL
Dynamic Param

See Also:
Constant Field Values

DynamicParam

public static final SqlKind DynamicParam

OrderByORDINAL

public static final int OrderByORDINAL
See Also:
Constant Field Values

OrderBy

public static final SqlKind OrderBy

UnionORDINAL

public static final int UnionORDINAL
Union

See Also:
Constant Field Values

Union

public static final SqlKind Union

ExceptORDINAL

public static final int ExceptORDINAL
Except

See Also:
Constant Field Values

Except

public static final SqlKind Except

IntersectORDINAL

public static final int IntersectORDINAL
Intersect

See Also:
Constant Field Values

Intersect

public static final SqlKind Intersect

AsORDINAL

public static final int AsORDINAL
AS operator

See Also:
Constant Field Values

As

public static final SqlKind As

OverORDINAL

public static final int OverORDINAL
See Also:
Constant Field Values

Over

public static final SqlKind Over
OVER operator


WindowORDINAL

public static final int WindowORDINAL
See Also:
Constant Field Values

Window

public static final SqlKind Window
Window specification


MergeORDINAL

public static final int MergeORDINAL
MERGE statement

See Also:
Constant Field Values

Merge

public static final SqlKind Merge

TableSampleORDINAL

public static final int TableSampleORDINAL
TABLESAMPLE operator

See Also:
Constant Field Values

TableSample

public static final SqlKind TableSample

TimesORDINAL

public static final int TimesORDINAL
Times

See Also:
Constant Field Values

Times

public static final SqlKind Times

DivideORDINAL

public static final int DivideORDINAL
Divide

See Also:
Constant Field Values

Divide

public static final SqlKind Divide

PlusORDINAL

public static final int PlusORDINAL
Plus

See Also:
Constant Field Values

Plus

public static final SqlKind Plus

MinusORDINAL

public static final int MinusORDINAL
Minus

See Also:
Constant Field Values

Minus

public static final SqlKind Minus

InORDINAL

public static final int InORDINAL
In

See Also:
Constant Field Values

In

public static final SqlKind In

LessThanORDINAL

public static final int LessThanORDINAL
LessThan

See Also:
Constant Field Values

LessThan

public static final SqlKind LessThan

GreaterThanORDINAL

public static final int GreaterThanORDINAL
GreaterThan

See Also:
Constant Field Values

GreaterThan

public static final SqlKind GreaterThan

LessThanOrEqualORDINAL

public static final int LessThanOrEqualORDINAL
LessThanOrEqual

See Also:
Constant Field Values

LessThanOrEqual

public static final SqlKind LessThanOrEqual

GreaterThanOrEqualORDINAL

public static final int GreaterThanOrEqualORDINAL
GreaterThanOrEqual

See Also:
Constant Field Values

GreaterThanOrEqual

public static final SqlKind GreaterThanOrEqual

EqualsORDINAL

public static final int EqualsORDINAL
Equals

See Also:
Constant Field Values

Equals

public static final SqlKind Equals

NotEqualsORDINAL

public static final int NotEqualsORDINAL
NotEquals

See Also:
Constant Field Values

NotEquals

public static final SqlKind NotEquals

ComparisonORDINAL

public static final int ComparisonORDINAL
Comparison

See Also:
Constant Field Values

Comparison

public static final SqlKind Comparison

OrORDINAL

public static final int OrORDINAL
Or

See Also:
Constant Field Values

Or

public static final SqlKind Or

AndORDINAL

public static final int AndORDINAL
And

See Also:
Constant Field Values

And

public static final SqlKind And

DotORDINAL

public static final int DotORDINAL
Dot

See Also:
Constant Field Values

Dot

public static final SqlKind Dot

OverlapsORDINAL

public static final int OverlapsORDINAL
Overlaps

See Also:
Constant Field Values

Overlaps

public static final SqlKind Overlaps

LikeORDINAL

public static final int LikeORDINAL
Like

See Also:
Constant Field Values

Like

public static final SqlKind Like

SimilarORDINAL

public static final int SimilarORDINAL
Similar

See Also:
Constant Field Values

Similar

public static final SqlKind Similar

BetweenORDINAL

public static final int BetweenORDINAL
Between

See Also:
Constant Field Values

Between

public static final SqlKind Between

CaseORDINAL

public static final int CaseORDINAL
CASE

See Also:
Constant Field Values

Case

public static final SqlKind Case

NotORDINAL

public static final int NotORDINAL
Not

See Also:
Constant Field Values

Not

public static final SqlKind Not

PlusPrefixORDINAL

public static final int PlusPrefixORDINAL
PlusPrefix

See Also:
Constant Field Values

PlusPrefix

public static final SqlKind PlusPrefix

MinusPrefixORDINAL

public static final int MinusPrefixORDINAL
MinusPrefix

See Also:
Constant Field Values

MinusPrefix

public static final SqlKind MinusPrefix

ExistsORDINAL

public static final int ExistsORDINAL
Exists

See Also:
Constant Field Values

Exists

public static final SqlKind Exists

ValuesORDINAL

public static final int ValuesORDINAL
Values

See Also:
Constant Field Values

Values

public static final SqlKind Values

ExplicitTableORDINAL

public static final int ExplicitTableORDINAL
ExplicitTable, e.g. select * from (TABLE t) or TABLE t. See also CollectionTable.

See Also:
Constant Field Values

ExplicitTable

public static final SqlKind ExplicitTable

ProcedureCallORDINAL

public static final int ProcedureCallORDINAL
ProcedureCall

See Also:
Constant Field Values

ProcedureCall

public static final SqlKind ProcedureCall

NewSpecificationORDINAL

public static final int NewSpecificationORDINAL
NewSpecification

See Also:
Constant Field Values

NewSpecification

public static final SqlKind NewSpecification

DescendingORDINAL

public static final int DescendingORDINAL
Descending

See Also:
Constant Field Values

Descending

public static final SqlKind Descending

IsTrueORDINAL

public static final int IsTrueORDINAL
IS TRUE

See Also:
Constant Field Values

IsTrue

public static final SqlKind IsTrue

IsFalseORDINAL

public static final int IsFalseORDINAL
IS FALSE

See Also:
Constant Field Values

IsFalse

public static final SqlKind IsFalse

IsUnknownORDINAL

public static final int IsUnknownORDINAL
IS UNKNOWN

See Also:
Constant Field Values

IsUnknown

public static final SqlKind IsUnknown

IsNullORDINAL

public static final int IsNullORDINAL
IS NULL

See Also:
Constant Field Values

IsNull

public static final SqlKind IsNull

PrecedingORDINAL

public static final int PrecedingORDINAL
PRECEDING

See Also:
Constant Field Values

Preceding

public static final SqlKind Preceding

FollowingORDINAL

public static final int FollowingORDINAL
FOLLOWING

See Also:
Constant Field Values

Following

public static final SqlKind Following

RowORDINAL

public static final int RowORDINAL
ROW function

See Also:
Constant Field Values

Row

public static final SqlKind Row

CastORDINAL

public static final int CastORDINAL
CAST

See Also:
Constant Field Values

Cast

public static final SqlKind Cast

TrimORDINAL

public static final int TrimORDINAL
TRIM

See Also:
Constant Field Values

Trim

public static final SqlKind Trim

JdbcFnORDINAL

public static final int JdbcFnORDINAL
Call to a function using JDBC function syntax.

See Also:
Constant Field Values

JdbcFn

public static final SqlKind JdbcFn

MultisetValueConstructorORDINAL

public static final int MultisetValueConstructorORDINAL
MultisetValueConstructor Value Constructor

See Also:
Constant Field Values

MultisetValueConstructor

public static final SqlKind MultisetValueConstructor

MultisetQueryConstructorORDINAL

public static final int MultisetQueryConstructorORDINAL
MultisetValueConstructor Query Constructor

See Also:
Constant Field Values

MultisetQueryConstructor

public static final SqlKind MultisetQueryConstructor

UnnestORDINAL

public static final int UnnestORDINAL
Unnest

See Also:
Constant Field Values

Unnest

public static final SqlKind Unnest

LateralORDINAL

public static final int LateralORDINAL
Lateral

See Also:
Constant Field Values

Lateral

public static final SqlKind Lateral

CollectionTableORDINAL

public static final int CollectionTableORDINAL
Table operator which converts user-defined transform into a relation, for example, select * from TABLE(udx(x, y, z)). See also the ExplicitTable prefix operator.

See Also:
Constant Field Values

CollectionTable

public static final SqlKind CollectionTable

CursorConstructorORDINAL

public static final int CursorConstructorORDINAL
CURSOR constructor, for example, select * from TABLE(udx(CURSOR(select ...), x, y, z))

See Also:
Constant Field Values

CursorConstructor

public static final SqlKind CursorConstructor

LiteralChainORDINAL

public static final int LiteralChainORDINAL
LiteralChain operator (for composite string literals)

See Also:
Constant Field Values

LiteralChain

public static final SqlKind LiteralChain

EscapeORDINAL

public static final int EscapeORDINAL
Escape operator (always part of LIKE or SIMILAR TO expression)

See Also:
Constant Field Values

Escape

public static final SqlKind Escape

ReinterpretORDINAL

public static final int ReinterpretORDINAL
Reinterpret operator (a reinterpret cast)

See Also:
Constant Field Values

Reinterpret

public static final SqlKind Reinterpret

SetQueryORDINAL

public static final int SetQueryORDINAL
SetQuery is an aggregate of set-query node types. node.isA(Kind.SetQuery) evaluates to true if it node is an Except, Intersect or Union.

See Also:
Constant Field Values

SetQuery

public static final SqlKind SetQuery

ExpressionORDINAL

public static final int ExpressionORDINAL
Expression is an aggregate of all expression operators.

See Also:
Constant Field Values

Expression

public static final SqlKind Expression

DmlORDINAL

public static final int DmlORDINAL
Dml is an aggregate of all DML operators. node.isA(Kind.Dml) evaluates to true if it node is an Insert or Delete.

See Also:
Constant Field Values

Dml

public static final SqlKind Dml

QueryORDINAL

public static final int QueryORDINAL
Query is an aggregate of query node types. node.isA(Kind.SetQuery) evaluates to true if it node is a Except, Intersect, Select or Union.

See Also:
Constant Field Values

Query

public static final SqlKind Query

TopLevelORDINAL

public static final int TopLevelORDINAL
Aggregate of SQL statement types Query, Dml.

See Also:
Constant Field Values

TopLevel

public static final SqlKind TopLevel

ScalarQueryORDINAL

public static final int ScalarQueryORDINAL
ScalarQuery is an aggregate of scalar query node types.

See Also:
Constant Field Values

ScalarQuery

public static final SqlKind ScalarQuery

ColumnListConstructorORDINAL

public static final int ColumnListConstructorORDINAL
COLUMN_LIST constructor, for example, the ROW() call in select * from TABLE(udx(CURSOR(select ...), ROW(a, b, c, d), x, y, z))

See Also:
Constant Field Values

ColumnListConstructor

public static final SqlKind ColumnListConstructor

enumeration

public static final EnumeratedValues enumeration
Constructor Detail

SqlKind

private SqlKind(String name,
                int ordinal)
Method Detail

isA

public boolean isA(SqlKind kind)
Returns whether this kind is the same as a given kind, or is a member if the given kind is an aggregate


get

public static SqlKind get(int ordinal)
Looks up a kind from its ordinal.


get

public static SqlKind get(String name)
Looks up a kind from its name.