Examples of parseStatement()


Examples of com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatement()

public class Issue_685 extends TestCase {

    public void test_for_issue() throws Exception {
        OracleStatementParser parser = new OracleStatementParser("select upper(*) from aa order by now()");
        SQLStatement st = parser.parseStatement();
        st.toString();
    }
}
View Full Code Here

Examples of com.foundationdb.sql.parser.SQLParser.parseStatement()

    protected void runAlter(String schema, QueryContext queryContext, String sql) {
        SQLParser parser = new SQLParser();
        StatementNode node;
        try {
            node = parser.parseStatement(sql);
        } catch(StandardException e) {
            throw new RuntimeException(e);
        }
        org.junit.Assert.assertTrue("is alter node", node instanceof AlterTableNode);
        AlterTableDDL.alterTable(ddl(), dml(), session(), schema, (AlterTableNode) node, queryContext);
View Full Code Here

Examples of com.stuffwithstuff.magpie.parser.MagpieParser.parseStatement()

     
      try {
        MagpieParser parser = new MagpieParser(new StringReader("", source));

        while (true) {
          Expr expr = parser.parseStatement();
          if (expr == null) break;
        }
      } catch (ParseException e) {
        canParse = false;
      }
View Full Code Here

Examples of com.stuffwithstuff.magpie.parser.MagpieParser.parseStatement()

 
  public ReplResult readAndEvaluate(SourceReader reader) {
    MagpieParser parser = new MagpieParser(reader);

    try {
      Expr expr = parser.parseStatement();
      parser.consume(TokenType.LINE);
     
      Obj result = mInterpreter.interpret(expr);
      String resultText;
      if (result == mInterpreter.nothing()) {
View Full Code Here

Examples of lombok.ast.grammar.Source.parseStatement()

    return process(s, "vardef", VariableDefinition.class);
  }
 
  public static Statement parseStatement(String source) throws AstException {
    Source s = new Source(source, "statementSnippet");
    s.parseStatement();
    return process(s, "statement", Statement.class);
  }
 
  public static Expression parseExpression(String source) throws AstException {
    Source s = new Source(source, "expressionSnippet");
View Full Code Here

Examples of mondrian.olap.Connection.parseStatement()

        Role role = request.getRole();

        final Connection connection = getConnection(dsCatalog, role, roleName);

        final String statement = request.getStatement();
        final QueryPart parseTree = connection.parseStatement(statement);
        final DrillThrough drillThrough = (DrillThrough) parseTree;
        final Query query = drillThrough.getQuery();
        query.setResultStyle(ResultStyle.LIST);
        final Result result = connection.execute(query);
        // cell [0, 0] in a 2-dimensional query, [0, 0, 0] in 3 dimensions, etc.
View Full Code Here

Examples of mondrian.rolap.RolapConnection.parseStatement()

  public static boolean isMondrianDrillthrough(OlapConnection con, String mdx) {
    boolean isMondrian = isMondrianConnection(con);
    if (isMondrian) {
      RolapConnection rcon = getMondrianConnection(con);
      QueryPart qp = rcon.parseStatement(mdx);
      return (qp != null && qp instanceof DrillThrough);
    }
    return false;
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Parser.parseStatement()

        cc.setCurrentDependent(preparedStmt);

        //Only top level statements go through here, nested statement
        //will invoke this method from other places
        StatementNode qt = p.parseStatement(statementText, paramDefaults);

        parseTime = getCurrentTimeMillis(lcc);

                // Call user-written tree-printer if it exists
                walkAST( lcc, qt, ASTVisitor.AFTER_PARSE);
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Parser.parseStatement()

    p = newCC.getParser();
       
    /* Finally, we can call the parser */
    // Since this is always nested inside another SQL statement, so topLevel flag
    // should be false
    StatementNode qt = p.parseStatement(select);
    if (SanityManager.DEBUG)
    {
      if (! (qt instanceof CursorNode))
      {
        SanityManager.THROWASSERT(
View Full Code Here

Examples of org.apache.derby.iapi.sql.compile.Parser.parseStatement()

        newCC.setReliability(CompilerContext.INTERNAL_SQL_LEGAL);

    try
    {
      Parser p = newCC.getParser();
      return p.parseStatement(sql);
    }

    finally
    {
      lcc.popCompilerContext(newCC);
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.