private void addIndexedColumns() throws SQLException {
  DatabaseMetaData metaData=getDatabaseMetaData();
  Arrays.sort(columnIndexes);
  List<String> columns=new ArrayList<>();
  try (ResultSet rs=metaData.getColumns(null,null,normalizeObjectName(statementModel.getTableName()),null)){
    while (rs.next()) {
      if (Arrays.binarySearch(columnIndexes,rs.getInt(IDX_ORDINAL_POSITION)) >= 0) {
        columns.add(quoteObjectName(rs.getString(IDX_COLUMN_NAME)));
      }
    }
  }
   columnNames=columns.toArray(new String[0]);
  addReturningClause();
}

private void addIndexedColumns ( ) throws SQLException { DatabaseMetaData metaData = getDatabaseMetaData ( ) ; Arrays . sort ( columnIndexes ) ; List < String > columns = new ArrayList < > ( ) ; try ( ResultSet rs = metaData . getColumns ( null , null , normalizeObjectName ( statementModel . getTableName ( ) ) , null ) ) { while ( rs . next ( ) ) { if ( Arrays . binarySearch ( columnIndexes , rs . getInt ( IDX_ORDINAL_POSITION ) ) >= 0 ) { columns . add ( quoteObjectName ( rs . getString ( IDX_COLUMN_NAME ) ) ) ; } } } columnNames = columns . toArray ( new String [ 0 ] ) ; addReturningClause ( ) ; }
adds all columns referenced by columnindexes to the query as generated keys .
