/** * Creates an index of the specified type for the specified field. A unique ID is assigned to this * index, and its information is stored in the idxcat table. * * @param idxName the name of the index * @param tblName the name of the indexed table * @param fldName the name of the indexed field * @param idxType the index type of the indexed field * @param tx the calling transaction */ public void createIndex( String idxName, String tblName, String fldName, int idxType, Transaction tx) { RecordFile rf = ti.open(tx); rf.insert(); rf.setVal(ICAT_IDXNAME, new VarcharConstant(idxName)); rf.setVal(ICAT_TBLNAME, new VarcharConstant(tblName)); rf.setVal(ICAT_FLDNAME, new VarcharConstant(fldName)); rf.setVal(ICAT_IDXTYPE, new IntegerConstant(idxType)); rf.close(); }