/*
 * Copyright 1999-2015 dangdang.com.
 * <p>
 * Licensed under the Apache License,Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * </p>
 */

package com.dangdang.ddframe.rdb.sharding.parsing.lexer.token;

/**
 * 默认词法关键词.
 * 
 * @author zhangliang 
 */
public enum DefaultKeyword implements Keyword {
    
    SELECT,
    DELETE,
    INSERT,
    UPDATE,
    CREATE,
    ALTER,
    DROP,
    TRUNCATE,
    REPLACE,
    DECLARE,
    GRANT,
    REVOKE,
    AS,
    DISTINCT,
    MAX,
    MIN,
    SUM,
    AVG,
    COUNT,
    FROM,
    WHERE,
    ORDER,
    ASC,
    DESC,
    GROUP,
    BY, 
    HAVING, 
    INTO, 
    VALUES, 
    COLUMN, 
    TABLE, 
    TABLESPACE, 
    SET, 
    ADD,
    RENAME, 
    PRIMARY,
    KEY,
    INDEX,
    CONSTRAINT,
    CHECK,
    UNIQUE,
    FOREIGN,
    REFERENCES,
    INNER,
    LEFT,
    RIGHT,
    FULL,
    OUTER,
    CROSS, 
    JOIN,
    STRAIGHT_JOIN,
    APPLY,
    ON,
    IS,
    IN,
    BETWEEN,
    LIKE,
    AND,
    OR,
    XOR,
    NULL,
    NOT,
    NO,
    FOR,
    ALL,
    UNION,
    CAST,
    USE,
    USING,
    TO,
    CASE,
    WHEN,
    THEN,
    ELSE,
    END,
    EXISTS,
    NEW,
    ESCAPE,
    LOCK,
    SOME,
    ANY,
    WHILE,
    DO,
    LEAVE,
    ITERATE,
    REPEAT,
    UNTIL,
    OPEN,
    CLOSE,
    OUT,
    INOUT,
    OVER,
    FETCH,
    WITH,
    WITHOUT,
    CURSOR,
    ADVISE,
    SIBLINGS,
    LOOP,
    ENABLE,
    DISABLE,
    EXPLAIN,
    SCHEMA,
    DATABASE,
    VIEW,
    SEQUENCE,
    TRIGGER,
    PROCEDURE,
    FUNCTION,
    DEFAULT,
    EXCEPT,
    INTERSECT,
    MINUS,
    USER,
    PASSWORD,
    IF,
    GLOBAL,
    LOCAL, 
    TEMPORARY,
    COMMENT,
    STORAGE,
    DATA,
    
    /*
     * Types
     */
    CHAR,
    CHARACTER,
    VARYING,
    VARCHAR,
    VARCHAR2,
    INTEGER,
    INT,
    SMALLINT,
    DECIMAL,
    DEC,
    NUMERIC,
    FLOAT,
    REAL,
    DOUBLE,
    PRECISION,
    DATE,
    TIME,
    INTERVAL,
    BOOLEAN,
    BLOB
}

@@ -939,55 +939,8 @@
 CT,%0A
-    MAX,%0A    MIN,%0A    SUM,%0A    AVG,%0A    COUNT,%0A
     
@@ -945,16 +945,16 @@
   FROM,%0A
+
     WHER
@@ -1335,92 +1335,8 @@
 ON,%0A
-    IS,%0A    IN,%0A    BETWEEN,%0A    LIKE,%0A    AND,%0A    OR,%0A    XOR,%0A    NULL,%0A    NOT,%0A
     
@@ -1352,17 +1352,8 @@
 OR,%0A
-    ALL,%0A
     
@@ -1503,17 +1503,8 @@
 ME,%0A
-    ANY,%0A
     
@@ -2001,19 +2001,16 @@
   /*%0A   
-  *
  Types%0A 
@@ -2251,15 +2251,15 @@
 AN,%0A
-
     BLOB
 %0A%7D%0A
@@ -2255,11 +2255,545 @@
     BLOB
+,%0A    %0A    /*%0A    Conditionals%0A     */%0A    AND,%0A    OR,%0A    XOR,%0A    IS,%0A    NOT,%0A    NULL,%0A    IN,%0A    BETWEEN,%0A    LIKE,%0A    ANY,%0A    ALL,%0A    %0A    /*%0A    Functions%0A     */%0A    AVG,%0A    MAX,%0A    MIN,%0A    SUM,%0A    COUNT,%0A    GREATEST,%0A    LEAST,%0A    ROUND,%0A    TRUNC,%0A    POSITION,%0A    EXTRACT,%0A    LENGTH,%0A    CHAR_LENGTH,%0A    SUBSTRING,%0A    SUBSTR,%0A    INSTR,%0A    INITCAP,%0A    UPPER,%0A    LOWER,%0A    TRIM,%0A    LTRIM,%0A    RTRIM,%0A    BOTH,%0A    LEADING,%0A    TRAILING,%0A    TRANSLATE,%0A    CONVERT,%0A    LPAD,%0A    RPAD,%0A    DECODE,%0A    NVL
 %0A%7D%0A

add keyword to default keyword for functions