Examples of OracleDateExpr


Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        accept(Token.DATE);

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        accept(Token.DATE);

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    public SQLExpr primaryRest(SQLExpr expr) {
        if (expr.getClass() == SQLIdentifierExpr.class) {
            String ident = ((SQLIdentifierExpr)expr).getName();
           
            if ("DATE".equalsIgnoreCase(ident)) {
                OracleDateExpr timestamp = new OracleDateExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);
               
                return primaryRest(timestamp);    
            }
            if ("TIMESTAMP".equalsIgnoreCase(ident)) {
                if (lexer.token() != Token.LITERAL_ALIAS && lexer.token() != Token.LITERAL_CHARS) {
                    return new SQLIdentifierExpr("TIMESTAMP");
                }

                OracleTimestampExpr timestamp = new OracleTimestampExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);

                if (identifierEquals("AT")) {
                    lexer.nextToken();
                    acceptIdentifier("TIME");
                    acceptIdentifier("ZONE");

                    String timezone = lexer.stringVal();
                    timestamp.setTimeZone(timezone);
                    accept(Token.LITERAL_CHARS);
                }

               
                return primaryRest(timestamp);    
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        accept(Token.DATE);

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    public SQLExpr primaryRest(SQLExpr expr) {
        if (expr.getClass() == SQLIdentifierExpr.class) {
            String ident = ((SQLIdentifierExpr)expr).getName();
           
            if ("DATE".equalsIgnoreCase(ident)) {
                OracleDateExpr timestamp = new OracleDateExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);
               
                return primaryRest(timestamp);    
            }
            if ("TIMESTAMP".equalsIgnoreCase(ident)) {
                if (lexer.token() != Token.LITERAL_ALIAS && lexer.token() != Token.LITERAL_CHARS) {
                    return new SQLIdentifierExpr("TIMESTAMP");
                }

                OracleTimestampExpr timestamp = new OracleTimestampExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);

                if (identifierEquals("AT")) {
                    lexer.nextToken();
                    acceptIdentifier("TIME");
                    acceptIdentifier("ZONE");

                    String timezone = lexer.stringVal();
                    timestamp.setTimeZone(timezone);
                    accept(Token.LITERAL_CHARS);
                }

               
                return primaryRest(timestamp);    
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        acceptIdentifier("DATE");

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        acceptIdentifier("DATE");

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    public SQLExpr primaryRest(SQLExpr expr) {
        if (expr.getClass() == SQLIdentifierExpr.class) {
            String ident = ((SQLIdentifierExpr)expr).getName();
           
            if ("DATE".equalsIgnoreCase(ident)) {
                OracleDateExpr timestamp = new OracleDateExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);
               
                return primaryRest(timestamp);    
            }
            if ("TIMESTAMP".equalsIgnoreCase(ident)) {
                if (lexer.token() != Token.LITERAL_ALIAS && lexer.token() != Token.LITERAL_CHARS) {
                    return new SQLIdentifierExpr("TIMESTAMP");
                }

                OracleTimestampExpr timestamp = new OracleTimestampExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);

                if (identifierEquals("AT")) {
                    lexer.nextToken();
                    acceptIdentifier("TIME");
                    acceptIdentifier("ZONE");

                    String timezone = lexer.stringVal();
                    timestamp.setTimeZone(timezone);
                    accept(Token.LITERAL_CHARS);
                }

               
                return primaryRest(timestamp);    
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    }

    public OracleDateExpr parseDate() {
        acceptIdentifier("DATE");

        OracleDateExpr timestamp = new OracleDateExpr();

        String literal = lexer.stringVal();
        timestamp.setLiteral(literal);
        accept(Token.LITERAL_CHARS);

        return timestamp;
    }
View Full Code Here

Examples of com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateExpr

    public SQLExpr primaryRest(SQLExpr expr) {
        if (expr.getClass() == SQLIdentifierExpr.class) {
            String ident = ((SQLIdentifierExpr)expr).getName();
           
            if ("DATE".equalsIgnoreCase(ident)) {
                OracleDateExpr timestamp = new OracleDateExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);
               
                return primaryRest(timestamp);    
            }
            if ("TIMESTAMP".equalsIgnoreCase(ident)) {
                if (lexer.token() != Token.LITERAL_ALIAS && lexer.token() != Token.LITERAL_CHARS) {
                    return new SQLIdentifierExpr("TIMESTAMP");
                }

                OracleTimestampExpr timestamp = new OracleTimestampExpr();

                String literal = lexer.stringVal();
                timestamp.setLiteral(literal);
                accept(Token.LITERAL_CHARS);

                if (identifierEquals("AT")) {
                    lexer.nextToken();
                    acceptIdentifier("TIME");
                    acceptIdentifier("ZONE");

                    String timezone = lexer.stringVal();
                    timestamp.setTimeZone(timezone);
                    accept(Token.LITERAL_CHARS);
                }

               
                return primaryRest(timestamp);    
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.