private void createIndex(String indexName,boolean unique,boolean scalarRequired,boolean lax,JsonPath[] columns,String language) throws OracleException {
  PreparedStatement stmt=null;
  if (indexName == null)   throw SODAUtils.makeException(SODAMessage.EX_ARG_CANNOT_BE_NULL,"indexName");
  indexName=CollectionDescriptor.stringToIdentifier(indexName);
  String sqltext=null;
  if (columns == null || columns.length == 0) {
    if ((options.contentDataType == CollectionDescriptor.NCHAR_CONTENT) || (options.contentDataType == CollectionDescriptor.NCLOB_CONTENT)) {
      throw SODAUtils.makeException(SODAMessage.EX_UNSUPPORTED_INDEX_CREATE,options.getContentDataType());
    }
 else     if (options.contentLobEncrypt != CollectionDescriptor.LOB_ENCRYPT_NONE) {
      throw SODAUtils.makeException(SODAMessage.EX_UNSUPPORTED_ENCRYPTED_INDEX_CREATE);
    }
 else     if (options.keyDataType == CollectionDescriptor.NCHAR_KEY) {
      throw SODAUtils.makeException(SODAMessage.EX_UNSUPPORTED_INDEX_CREATE2);
    }
    sqltext=buildCTXIndexDDL(indexName,language);
  }
 else {
    sqltext=buildIndexDDL(indexName,unique,scalarRequired,lax,columns);
  }
  try {
    metrics.startTiming();
    if (OracleLog.isLoggingEnabled())     log.info("Index DDL: " + sqltext);
    stmt=conn.prepareStatement(sqltext);
    stmt.execute();
    if (OracleLog.isLoggingEnabled())     log.info("Created index " + indexName);
    stmt.close();
    stmt=null;
    metrics.recordDDL();
  }
 catch (  SQLException e) {
    if (e.getErrorCode() == ORA_SQL_OBJECT_EXISTS) {
      if (OracleLog.isLoggingEnabled())       log.warning(e.toString());
    }
 else {
      if (OracleLog.isLoggingEnabled())       log.warning(e.toString());
      throw SODAUtils.makeExceptionWithSQLText(e,sqltext);
    }
  }
 finally {
    for (    String message : SODAUtils.closeCursor(stmt,null)) {
      if (OracleLog.isLoggingEnabled())       log.severe(message);
    }
  }
}

private void createIndex ( String indexName , boolean unique , boolean scalarRequired , boolean lax , JsonPath [ ] columns , String language ) throws OracleException { PreparedStatement stmt = null ; if ( indexName == null ) throw SODAUtils . makeException ( SODAMessage . EX_ARG_CANNOT_BE_NULL , "indexName" ) ; indexName = CollectionDescriptor . stringToIdentifier ( indexName ) ; String sqltext = null ; if ( columns == null || columns . length == 0 ) { if ( ( options . contentDataType == CollectionDescriptor . NCHAR_CONTENT ) || ( options . contentDataType == CollectionDescriptor . NCLOB_CONTENT ) ) { throw SODAUtils . makeException ( SODAMessage . EX_UNSUPPORTED_INDEX_CREATE , options . getContentDataType ( ) ) ; } else if ( options . contentLobEncrypt != CollectionDescriptor . LOB_ENCRYPT_NONE ) { throw SODAUtils . makeException ( SODAMessage . EX_UNSUPPORTED_ENCRYPTED_INDEX_CREATE ) ; } else if ( options . keyDataType == CollectionDescriptor . NCHAR_KEY ) { throw SODAUtils . makeException ( SODAMessage . EX_UNSUPPORTED_INDEX_CREATE2 ) ; } sqltext = buildCTXIndexDDL ( indexName , language ) ; } else { sqltext = buildIndexDDL ( indexName , unique , scalarRequired , lax , columns ) ; } try { metrics . startTiming ( ) ; if ( OracleLog . isLoggingEnabled ( ) ) log . info ( "Index DDL: " + sqltext ) ; stmt = conn . prepareStatement ( sqltext ) ; stmt . execute ( ) ; if ( OracleLog . isLoggingEnabled ( ) ) log . info ( "Created index " + indexName ) ; stmt . close ( ) ; stmt = null ; metrics . recordDDL ( ) ; } catch ( SQLException e ) { if ( e . getErrorCode ( ) == ORA_SQL_OBJECT_EXISTS ) { if ( OracleLog . isLoggingEnabled ( ) ) log . warning ( e . toString ( ) ) ; } else { if ( OracleLog . isLoggingEnabled ( ) ) log . warning ( e . toString ( ) ) ; throw SODAUtils . makeExceptionWithSQLText ( e , sqltext ) ; } } finally { for ( String message : SODAUtils . closeCursor ( stmt , null ) ) { if ( OracleLog . isLoggingEnabled ( ) ) log . severe ( message ) ; } } }
create a concatenated index on an array of paths . the rdbms implementation accepts an indexcolumn [ ] array as well .
