private void callDropPLSQL(String collectionName) throws OracleException {
  OracleCallableStatement stmt=null;
  String sqltext="begin\n" + " DBMS_SODA_ADMIN.DROP_COLLECTION(P_URI_NAME => ?);\n" + "end;";
  try {
    metrics.startTiming();
    stmt=(OracleCallableStatement)conn.prepareCall(sqltext);
    stmt.setNString(1,collectionName);
    stmt.execute();
    if (OracleLog.isLoggingEnabled())     log.info("Dropped collection " + collectionName);
    stmt.close();
    stmt=null;
    metrics.recordDDL();
  }
 catch (  SQLException e) {
    if (OracleLog.isLoggingEnabled())     log.severe(e.toString());
    boolean commitNeeded=false;
    try {
      if (sqlSyntaxLevel == SODAUtils.SQLSyntaxLevel.SQL_SYNTAX_UNKNOWN)       sqlSyntaxLevel=SODAUtils.getDatabaseVersion(conn);
    }
 catch (    SQLException se) {
      if (OracleLog.isLoggingEnabled())       log.severe(se.getMessage());
      throw new OracleException(se);
    }
    if (!SODAUtils.sqlSyntaxBelow_12_2(sqlSyntaxLevel)) {
      if (e.getErrorCode() == 40626) {
        commitNeeded=true;
      }
    }
 else     if (e.getErrorCode() == 54) {
      commitNeeded=true;
    }
    if (commitNeeded)     throw SODAUtils.makeExceptionWithSQLText(SODAMessage.EX_COMMIT_MIGHT_BE_NEEDED,e,sqltext);
    throw SODAUtils.makeExceptionWithSQLText(e,sqltext);
  }
 finally {
    for (    String message : SODAUtils.closeCursor(stmt,null)) {
      if (OracleLog.isLoggingEnabled())       log.severe(message);
    }
  }
}

private void callDropPLSQL ( String collectionName ) throws OracleException { OracleCallableStatement stmt = null ; String sqltext = "begin\n" + " DBMS_SODA_ADMIN.DROP_COLLECTION(P_URI_NAME => ?);\n" + "end;" ; try { metrics . startTiming ( ) ; stmt = ( OracleCallableStatement ) conn . prepareCall ( sqltext ) ; stmt . setNString ( 1 , collectionName ) ; stmt . execute ( ) ; if ( OracleLog . isLoggingEnabled ( ) ) log . info ( "Dropped collection " + collectionName ) ; stmt . close ( ) ; stmt = null ; metrics . recordDDL ( ) ; } catch ( SQLException e ) { if ( OracleLog . isLoggingEnabled ( ) ) log . severe ( e . toString ( ) ) ; boolean commitNeeded = false ; try { if ( sqlSyntaxLevel == SODAUtils . SQLSyntaxLevel . SQL_SYNTAX_UNKNOWN ) sqlSyntaxLevel = SODAUtils . getDatabaseVersion ( conn ) ; } catch ( SQLException se ) { if ( OracleLog . isLoggingEnabled ( ) ) log . severe ( se . getMessage ( ) ) ; throw new OracleException ( se ) ; } if ( ! SODAUtils . sqlSyntaxBelow_12_2 ( sqlSyntaxLevel ) ) { if ( e . getErrorCode ( ) == 40626 ) { commitNeeded = true ; } } else if ( e . getErrorCode ( ) == 54 ) { commitNeeded = true ; } if ( commitNeeded ) throw SODAUtils . makeExceptionWithSQLText ( SODAMessage . EX_COMMIT_MIGHT_BE_NEEDED , e , sqltext ) ; throw SODAUtils . makeExceptionWithSQLText ( e , sqltext ) ; } finally { for ( String message : SODAUtils . closeCursor ( stmt , null ) ) { if ( OracleLog . isLoggingEnabled ( ) ) log . severe ( message ) ; } } }
internal call to pl / sql ddl drop .
