Package com.alibaba.druid.sql.dialect.oracle.parser

Examples of com.alibaba.druid.sql.dialect.oracle.parser.OracleLexer


public class OracleLexerTest extends TestCase {

    public void test_hint() throws Exception {
        String sql = "SELECT /*+FIRST_ROWS*/ * FROM T WHERE F1 = ? ORDER BY F2";
        OracleLexer lexer = new OracleLexer(sql);
        for (;;) {
            lexer.nextToken();
            Token tok = lexer.token();

            switch (tok) {
                case IDENTIFIER:
                    System.out.println(tok.name() + "\t\t" + lexer.stringVal());
                    break;
                case HINT:
                    System.out.println(tok.name() + "\t\t\t" + lexer.stringVal());
                    break;
                default:
                    System.out.println(tok.name() + "\t\t\t" + tok.name);
                    break;
            }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.oracle.parser.OracleLexer

Copyright © 2018 www.massapicom. 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.