org.eigenbase.sql
Enum SqlWriter.FrameTypeEnum

java.lang.Object
  extended by java.lang.Enum<SqlWriter.FrameTypeEnum>
      extended by org.eigenbase.sql.SqlWriter.FrameTypeEnum
All Implemented Interfaces:
Serializable, Comparable<SqlWriter.FrameTypeEnum>, SqlWriter.FrameType
Enclosing interface:
SqlWriter

public static enum SqlWriter.FrameTypeEnum
extends Enum<SqlWriter.FrameTypeEnum>
implements SqlWriter.FrameType

Enumerates the types of frame.


Enum Constant Summary
FromList
          FROM clause (containing various kinds of JOIN).
FunCall
          Function call or datatype declaration.
FunDecl
          Function declaration.
GroupByList
          GROUP BY list.
Identifier
          Compound identifier.
OrderBy
          ORDER BY clause of a SELECT statement.
OrderByList
          ORDER BY list.
Select
          SELECT query (or UPDATE or DELETE).
SelectList
          The SELECT clause of a SELECT statement.
Setop
          Set operation.
Simple
          Simple list.
Subquery
          Sub-query list.
UpdateSetList
          The SET clause of an UPDATE statement.
WhereList
          WHERE clause.
Window
          Window specification.
WindowDeclList
          The WINDOW clause of a SELECT statement.
 
Field Summary
private  boolean needsIndent
           
 
Method Summary
static SqlWriter.FrameType create(String name)
           
 String getName()
           
 boolean needsIndent()
           
static SqlWriter.FrameTypeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SqlWriter.FrameTypeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Select

public static final SqlWriter.FrameTypeEnum Select
SELECT query (or UPDATE or DELETE). The items in the list are the clauses: FROM, WHERE, etc.


Simple

public static final SqlWriter.FrameTypeEnum Simple
Simple list.


SelectList

public static final SqlWriter.FrameTypeEnum SelectList
The SELECT clause of a SELECT statement.


WindowDeclList

public static final SqlWriter.FrameTypeEnum WindowDeclList
The WINDOW clause of a SELECT statement.


UpdateSetList

public static final SqlWriter.FrameTypeEnum UpdateSetList
The SET clause of an UPDATE statement.


FunDecl

public static final SqlWriter.FrameTypeEnum FunDecl
Function declaration.


FunCall

public static final SqlWriter.FrameTypeEnum FunCall
Function call or datatype declaration.

Examples:

  • SUBSTRING('foobar' FROM 1 + 2 TO 4)
  • DECIMAL(10, 5)

  • Window

    public static final SqlWriter.FrameTypeEnum Window
    Window specification.

    Examples:

  • SUM(x) OVER (ORDER BY hireDate ROWS 3 PRECEDING)
  • WINDOW w1 AS (ORDER BY hireDate), w2 AS (w1 PARTITION BY gender RANGE BETWEEN INTERVAL '1' YEAR PRECEDING AND '2' MONTH PRECEDING)

  • OrderBy

    public static final SqlWriter.FrameTypeEnum OrderBy
    ORDER BY clause of a SELECT statement. The "list" has only two items: the query and the order by clause, with ORDER BY as the separator.


    OrderByList

    public static final SqlWriter.FrameTypeEnum OrderByList
    ORDER BY list.

    Example:

  • ORDER BY x, y DESC, z


  • GroupByList

    public static final SqlWriter.FrameTypeEnum GroupByList
    GROUP BY list.

    Example:

  • GROUP BY x, FLOOR(y)


  • Subquery

    public static final SqlWriter.FrameTypeEnum Subquery
    Sub-query list. Encloses a SELECT, UNION, EXCEPT, INTERSECT query with optional ORDER BY.

    Example:

  • GROUP BY x, FLOOR(y)


  • Setop

    public static final SqlWriter.FrameTypeEnum Setop
    Set operation.

    Example:

  • SELECT * FROM a UNION SELECT * FROM b


  • FromList

    public static final SqlWriter.FrameTypeEnum FromList
    FROM clause (containing various kinds of JOIN).


    WhereList

    public static final SqlWriter.FrameTypeEnum WhereList
    WHERE clause.


    Identifier

    public static final SqlWriter.FrameTypeEnum Identifier
    Compound identifier.

    Example:

  • "A"."B"."C"

  • Field Detail

    needsIndent

    private final boolean needsIndent
    Method Detail

    values

    public static final SqlWriter.FrameTypeEnum[] values()
    Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
    for(SqlWriter.FrameTypeEnum c : SqlWriter.FrameTypeEnum.values())
            System.out.println(c);
    

    Returns:
    an array containing the constants of this enum type, in the order they're declared

    valueOf

    public static SqlWriter.FrameTypeEnum valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

    Parameters:
    name - the name of the enum constant to be returned.
    Returns:
    the enum constant with the specified name
    Throws:
    IllegalArgumentException - if this enum type has no constant with the specified name

    needsIndent

    public boolean needsIndent()
    Specified by:
    needsIndent in interface SqlWriter.FrameType

    create

    public static SqlWriter.FrameType create(String name)

    getName

    public String getName()
    Specified by:
    getName in interface SqlWriter.FrameType