MCPcopy Create free account
hub / github.com/BaseXdb/basex / indexAdd

Method indexAdd

basex-core/src/main/java/org/basex/data/Data.java:1094–1102  ·  view source on GitHub ↗

Inserts new entries in the index structure. @param pre first PRE value of the nodes to insert @param id ID (a simple value update is indicated by the value -1) @param size number of descendants @param clip data clip to be inserted

(final int pre, final int id, final int size, final DataClip clip)

Source from the content-addressed store, hash-verified

1092 * @param clip data clip to be inserted
1093 */
1094 protected final void indexAdd(final int pre, final int id, final int size, final DataClip clip) {
1095 if(id != -1) resources.insert(pre, clip);
1096 if(meta.updindex) {
1097 if(id != -1) idmap.insert(pre, id, size);
1098 if(meta.textindex) textIndex.add(new ValueCache(pre, size, IndexType.TEXT, this));
1099 if(meta.attrindex) attrIndex.add(new ValueCache(pre, size, IndexType.ATTRIBUTE, this));
1100 if(meta.tokenindex) tokenIndex.add(new ValueCache(pre, size, IndexType.TOKEN, this));
1101 }
1102 }
1103
1104 // HELPER FUNCTIONS =============================================================================
1105

Callers 4

replaceMethod · 0.95
insertMethod · 0.95
updateTextMethod · 0.80
updateTextMethod · 0.80

Calls 2

insertMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected