{ "name": "IndexTable", "comment": "IndexTable maintains a secondary index within a private Table instance.\n This index facilitates the indexing of non-unique secondary keys within a\n user Table.", "javadoc": "\u003ccode\u003eIndexTable\u003c/code\u003e maintains a secondary index within a private Table instance.\n This index facilitates the indexing of non-unique secondary keys within a\n user Table.", "static": false, "implements": [], "extends": "java.lang.Object", "fields": [ { "name": "emptyKeyArray", "comment": "", "javadoc": "", "static": true, "type_long": "db.Field[]", "type_short": "db.Field[]", "constant_value": null }, { "name": "db", "comment": "Database Handle", "javadoc": "Database Handle", "static": false, "type_long": "db.DBHandle", "type_short": "DBHandle", "constant_value": null }, { "name": "indexTableRecord", "comment": "Master table record for this index table.", "javadoc": "Master table record for this index table.", "static": false, "type_long": "db.TableRecord", "type_short": "TableRecord", "constant_value": null }, { "name": "primaryTable", "comment": "Primary table", "javadoc": "Primary table", "static": false, "type_long": "db.Table", "type_short": "Table", "constant_value": null }, { "name": "indexTable", "comment": "Underlying table which contains secondary index data.", "javadoc": "Underlying table which contains secondary index data.", "static": false, "type_long": "db.Table", "type_short": "Table", "constant_value": null }, { "name": "indexColumn", "comment": "Indexed column within primary table schema.", "javadoc": "Indexed column within primary table schema.", "static": false, "type_long": "int", "type_short": "int", "constant_value": null }, { "name": "isSparseIndex", "comment": "", "javadoc": "", "static": false, "type_long": "boolean", "type_short": "boolean", "constant_value": null } ], "methods": [ { "name": "\u003cinit\u003e", "comment": "Construct a new or existing secondary index. An existing index must have\n its root ID specified within the tableRecord.", "javadoc": "Construct a new or existing secondary index. An existing index must have\n its root ID specified within the tableRecord.\n@param primaryTable primary table.\n@param indexTableRecord specifies the index parameters.\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "primaryTable", "type_long": "db.Table", "type_short": "Table", "comment": "primary table." }, { "name": "indexTableRecord", "type_long": "db.TableRecord", "type_short": "TableRecord", "comment": "specifies the index parameters." } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "getIndexTable", "comment": "Get the index table for a specified index TableRecord.", "javadoc": "Get the index table for a specified index TableRecord.\n@param db database handle\n@param indexTableRecord master table record for an index table\n@return IndexTable index table\n@throws IOException thrown if IO error occurs", "static": true, "params": [ { "name": "db", "type_long": "db.DBHandle", "type_short": "DBHandle", "comment": "database handle" }, { "name": "indexTableRecord", "type_long": "db.TableRecord", "type_short": "TableRecord", "comment": "master table record for an index table" } ], "return": { "type_long": "db.IndexTable", "type_short": "IndexTable", "comment": "IndexTable index table" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "createIndexTable", "comment": "Create a new index table for an empty primary table.", "javadoc": "Create a new index table for an empty primary table.\n@param primaryTable primary table to be indexed\n@param indexColumn primary table column to be indexed\n@return IndexTable new index table\n@throws IOException thrown if IO error occurs", "static": true, "params": [ { "name": "primaryTable", "type_long": "db.Table", "type_short": "Table", "comment": "primary table to be indexed" }, { "name": "indexColumn", "type_long": "int", "type_short": "int", "comment": "primary table column to be indexed" } ], "return": { "type_long": "db.IndexTable", "type_short": "IndexTable", "comment": "IndexTable new index table" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "isConsistent", "comment": "Check the consistency of this index table.", "javadoc": "Check the consistency of this index table.\n@param monitor task monitor\n@return true if consistency check passed, else false\n@throws IOException if IO error occurs\n@throws CancelledException if task cancelled", "static": false, "params": [ { "name": "monitor", "type_long": "ghidra.util.task.TaskMonitor", "type_short": "TaskMonitor", "comment": "task monitor" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "true if consistency check passed, else false" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" }, { "type_long": "ghidra.util.exception.CancelledException", "type_short": "CancelledException", "comment": "if task cancelled" } ] }, { "name": "getPrimaryTableKeyType", "comment": "Get the primary table key type", "javadoc": "Get the primary table key type\n@return primary table key type", "static": false, "params": [], "return": { "type_long": "db.Field", "type_short": "Field", "comment": "primary table key type" }, "throws": [] }, { "name": "getTableNum", "comment": "Get the table number associated with the underlying index table.", "javadoc": "Get the table number associated with the underlying index table.\n@return table number", "static": false, "params": [], "return": { "type_long": "long", "type_short": "long", "comment": "table number" }, "throws": [] }, { "name": "getColumnIndex", "comment": "Get the indexed column within the primary table schema.", "javadoc": "Get the indexed column within the primary table schema.\n@return indexed column number", "static": false, "params": [], "return": { "type_long": "int", "type_short": "int", "comment": "indexed column number" }, "throws": [] }, { "name": "getStatistics", "comment": "Get index table statistics", "javadoc": "Get index table statistics\n@return statistics data\n@throws IOException thrown if IO error occurs", "static": false, "params": [], "return": { "type_long": "db.TableStatistics", "type_short": "TableStatistics", "comment": "statistics data" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "hasRecord", "comment": "Determine if there is an occurance of the specified index key value.", "javadoc": "Determine if there is an occurance of the specified index key value.\n@param field index key value\n@return true if an index key value equal to field exists.\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "field", "type_long": "db.Field", "type_short": "Field", "comment": "index key value" } ], "return": { "type_long": "boolean", "type_short": "boolean", "comment": "true if an index key value equal to field exists." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "findPrimaryKeys", "comment": "Find all primary keys which correspond to the specified indexed field\n value.", "javadoc": "Find all primary keys which correspond to the specified indexed field\n value.\n@param indexValue the field value to search for.\n@return list of primary keys\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "indexValue", "type_long": "db.Field", "type_short": "Field", "comment": "the field value to search for." } ], "return": { "type_long": "db.Field[]", "type_short": "db.Field[]", "comment": "list of primary keys" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "getKeyCount", "comment": "Get the number of primary keys which correspond to the specified indexed field\n value.", "javadoc": "Get the number of primary keys which correspond to the specified indexed field\n value.\n@param indexValue the field value to search for.\n@return key count\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "indexValue", "type_long": "db.Field", "type_short": "Field", "comment": "the field value to search for." } ], "return": { "type_long": "int", "type_short": "int", "comment": "key count" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "addEntry", "comment": "Add an entry to this index. Caller is responsible for ensuring that this\n is not a duplicate entry.", "javadoc": "Add an entry to this index. Caller is responsible for ensuring that this\n is not a duplicate entry.\n@param record new record\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "record", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "new record" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "deleteEntry", "comment": "Delete an entry from this index.", "javadoc": "Delete an entry from this index.\n@param oldRecord deleted record\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "oldRecord", "type_long": "db.DBRecord", "type_short": "DBRecord", "comment": "deleted record" } ], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "deleteAll", "comment": "Delete all records within this index table.", "javadoc": "Delete all records within this index table.\n@throws IOException if IO error occurs", "static": false, "params": [], "return": { "type_long": "void", "type_short": "void", "comment": "" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "indexIterator", "comment": "Iterate over all index keys. Index keys are sorted in ascending order.", "javadoc": "Iterate over all index keys. Index keys are sorted in ascending order.\n@return index key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "index key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "indexIterator", "comment": "Iterate over all the unique index field values within the specified range identified\n by minField and maxField. Index values are returned in an ascending sorted order.", "javadoc": "Iterate over all the unique index field values within the specified range identified\n by minField and maxField. Index values are returned in an ascending sorted order.\n@param minField minimum index column value, if null absolute minimum is used\n@param maxField maximum index column value, if null absolute maximum is used\n@param before if true initial position is before minField, else position\n is after endField\n@return index field iterator.\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "minField", "type_long": "db.Field", "type_short": "Field", "comment": "minimum index column value, if null absolute minimum is used" }, { "name": "maxField", "type_long": "db.Field", "type_short": "Field", "comment": "maximum index column value, if null absolute maximum is used" }, { "name": "before", "type_long": "boolean", "type_short": "boolean", "comment": "if true initial position is before minField, else position\n is after endField" } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "index field iterator." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "indexIterator", "comment": "Iterate over all the unique index field values within the specified range identified\n by minField and maxField. Index values are returned in an ascending sorted order with the \n initial iterator position corresponding to the startField.", "javadoc": "Iterate over all the unique index field values within the specified range identified\n by minField and maxField. Index values are returned in an ascending sorted order with the \n initial iterator position corresponding to the startField.\n@param minField minimum index column value, if null absolute minimum is used\n@param maxField maximum index column value, if null absolute maximum is used\n@param startField index column value corresponding to initial position of iterator\n@param before if true initial position is before startField value, else position\n is after startField value\n@return index field iterator.\n@throws IOException if IO error occurs", "static": false, "params": [ { "name": "minField", "type_long": "db.Field", "type_short": "Field", "comment": "minimum index column value, if null absolute minimum is used" }, { "name": "maxField", "type_long": "db.Field", "type_short": "Field", "comment": "maximum index column value, if null absolute maximum is used" }, { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "index column value corresponding to initial position of iterator" }, { "name": "before", "type_long": "boolean", "type_short": "boolean", "comment": "if true initial position is before startField value, else position\n is after startField value" } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "index field iterator." }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "if IO error occurs" } ] }, { "name": "keyIterator", "comment": "Iterate over all primary keys sorted based upon the associated index key.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIteratorBefore", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned before the first index buffer whose index key \n is greater than or equal to the specified startField value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned before the first index buffer whose index key \n is greater than or equal to the specified startField value.\n@param startField index key value which determines initial position of iterator\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "index key value which determines initial position of iterator" } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIteratorAfter", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned after the index buffer whose index key \n is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned after the index buffer whose index key \n is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.\n@param startField index key value which determines initial position of iterator\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "index key value which determines initial position of iterator" } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIteratorBefore", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned before the primaryKey within the index buffer \n whose index key is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned before the primaryKey within the index buffer \n whose index key is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.\n@param startField index key value which determines initial position of iterator\n@param primaryKey initial position within index buffer if index key matches startField value.\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "index key value which determines initial position of iterator" }, { "name": "primaryKey", "type_long": "db.Field", "type_short": "Field", "comment": "initial position within index buffer if index key matches startField value." } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIteratorAfter", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned after the primaryKey within the index buffer \n whose index key is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is initially positioned after the primaryKey within the index buffer \n whose index key is equal to the specified startField value or immediately before the first \n index buffer whose index key is greater than the specified startField value.\n@param startField index key value which determines initial position of iterator\n@param primaryKey initial position within index buffer if index key matches startField value.\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "index key value which determines initial position of iterator" }, { "name": "primaryKey", "type_long": "db.Field", "type_short": "Field", "comment": "initial position within index buffer if index key matches startField value." } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIterator", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is limited to range of index keys of minField through maxField, inclusive.\n If before is true, the iterator is initially positioned before the first index \n buffer whose index key is greater than or equal to the specified minField value. \n If before is false, the iterator is initially positioned after the first index \n buffer whose index key is less than or equal to the specified maxField value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is limited to range of index keys of minField through maxField, inclusive.\n If before is true, the iterator is initially positioned before the first index \n buffer whose index key is greater than or equal to the specified minField value. \n If before is false, the iterator is initially positioned after the first index \n buffer whose index key is less than or equal to the specified maxField value.\n@param minField minimum index key value\n@param maxField maximum index key value\n@param before if true, position iterator before minField value, \n Otherwise, position iterator after maxField value.\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "minField", "type_long": "db.Field", "type_short": "Field", "comment": "minimum index key value" }, { "name": "maxField", "type_long": "db.Field", "type_short": "Field", "comment": "maximum index key value" }, { "name": "before", "type_long": "boolean", "type_short": "boolean", "comment": "if true, position iterator before minField value, \n Otherwise, position iterator after maxField value." } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] }, { "name": "keyIterator", "comment": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is limited to range of index keys of minField through maxField, inclusive.\n The iterator is initially positioned before or after the specified startField index value.", "javadoc": "Iterate over all primary keys sorted based upon the associated index key.\n The iterator is limited to range of index keys of minField through maxField, inclusive.\n The iterator is initially positioned before or after the specified startField index value.\n@param minField minimum index key value\n@param maxField maximum index key value\n@param startField starting indexed value position\n@param before if true positioned before startField value, else positioned after maxField value\n@return primary key iterator\n@throws IOException thrown if IO error occurs", "static": false, "params": [ { "name": "minField", "type_long": "db.Field", "type_short": "Field", "comment": "minimum index key value" }, { "name": "maxField", "type_long": "db.Field", "type_short": "Field", "comment": "maximum index key value" }, { "name": "startField", "type_long": "db.Field", "type_short": "Field", "comment": "starting indexed value position" }, { "name": "before", "type_long": "boolean", "type_short": "boolean", "comment": "if true positioned before startField value, else positioned after maxField value" } ], "return": { "type_long": "db.DBFieldIterator", "type_short": "DBFieldIterator", "comment": "primary key iterator" }, "throws": [ { "type_long": "java.io.IOException", "type_short": "IOException", "comment": "thrown if IO error occurs" } ] } ] }