Esempio n. 1
0
 protected void parseInsert0_hinits(SQLInsertInto insertStatement) {
   if (insertStatement instanceof OracleInsertStatement) {
     OracleInsertStatement stmt = (OracleInsertStatement) insertStatement;
     this.getExprParser().parseHints(stmt.getHints());
   } else {
     List<SQLHint> hints = new ArrayList<SQLHint>(1);
     this.getExprParser().parseHints(hints);
   }
 }
Esempio n. 2
0
  public OracleStatement parseInsert() {
    if (lexer.token() == Token.LPAREN) {
      OracleInsertStatement stmt = new OracleInsertStatement();
      parseInsert0(stmt, false);

      stmt.setReturning(parseReturningClause());
      stmt.setErrorLogging(parseErrorLoggingClause());

      return stmt;
    }

    accept(Token.INSERT);

    List<SQLHint> hints = new ArrayList<SQLHint>();

    parseHints(hints);

    if (lexer.token() == Token.INTO) {
      OracleInsertStatement stmt = new OracleInsertStatement();
      stmt.setHints(hints);

      parseInsert0(stmt);

      stmt.setReturning(parseReturningClause());
      stmt.setErrorLogging(parseErrorLoggingClause());

      return stmt;
    }

    OracleMultiInsertStatement stmt = parseMultiInsert();
    stmt.setHints(hints);
    return stmt;
  }