Package adipe.translate.sql.parser.SqlParser

Examples of adipe.translate.sql.parser.SqlParser.SelectStatementsEofContext


     */
    private static void getMultipleQueryTrees(String source,
            List<String> queries, List<SelectStatementContext> trees)
                    throws ParseCancellationException
    {
        SelectStatementsEofContext tree;
        queries.clear();
        trees.clear();
        List<CharStream> charStreamL = Lists.newArrayList();
        SqlParser parser = getParser(source, charStreamL);

        tree = parser.selectStatementsEof();

        checkState(tree != null);
        checkState(!(tree instanceof ErrorNode));

        for (SelectStatementContext ssctx : tree.selectStatementsEtc().selectStatement())
        {
            trees.add(ssctx);
            queries.add(charStreamL.get(0).getText(new Interval(ssctx.start.getStartIndex(), ssctx.stop.getStopIndex())));
        }
    }
View Full Code Here

TOP

Related Classes of adipe.translate.sql.parser.SqlParser.SelectStatementsEofContext

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.