Examples of OracleTimestampExpr


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

    }

    public OracleTimestampExpr parseTimestamp() {
        accept(Token.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 timestamp;
    }
View Full Code Here

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

            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.OracleTimestampExpr

            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.OracleTimestampExpr

        new OracleSelectPivot.Item().accept(adapter);
        new OracleSelectPivot().accept(adapter);
        new CheckOption().accept(adapter);
        new ReadOnly().accept(adapter);
        new OracleSelectUnPivot().accept(adapter);
        new OracleTimestampExpr().accept(adapter);
        new PartitionExtensionClause().accept(adapter);
        new VersionsFlashbackQueryClause().accept(adapter);
        new VersionsFlashbackQueryClause().accept(adapter);
        new AsOfFlashbackQueryClause().accept(adapter);
        new GroupingSetExpr().accept(adapter);
View Full Code Here

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

public class EqualTest_OracleTimestampExpr extends TestCase {

    public void test_exits() throws Exception {
        String sql = "TIMESTAMP '' AT TIME ZONE ''";
        String sql_c = "TIMESTAMP '' AT TIME ZONE 'a'";
        OracleTimestampExpr exprA, exprB, exprC;
        {
            OracleExprParser parser = new OracleExprParser(sql);
            exprA = (OracleTimestampExpr) parser.expr();
        }
        {
            OracleExprParser parser = new OracleExprParser(sql);
            exprB = (OracleTimestampExpr) parser.expr();
        }
        {
            OracleExprParser parser = new OracleExprParser(sql_c);
            exprC = (OracleTimestampExpr) parser.expr();
        }
        Assert.assertEquals(exprA, exprB);
        Assert.assertNotEquals(exprA, exprC);
        Assert.assertTrue(exprA.equals(exprA));
        Assert.assertFalse(exprA.equals(new Object()));
        Assert.assertEquals(exprA.hashCode(), exprB.hashCode());
       
        Assert.assertEquals(new OracleTimestampExpr(), new OracleTimestampExpr());
        Assert.assertEquals(new OracleTimestampExpr().hashCode(), new OracleTimestampExpr().hashCode());
    }
View Full Code Here

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

       
        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 timestamp;
    }
View Full Code Here

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

            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.OracleTimestampExpr

            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.OracleTimestampExpr

            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.OracleTimestampExpr

            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.