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

Method run

basex-core/src/main/java/org/basex/core/cmd/Add.java:50–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 @Override
51 protected boolean run() {
52 if(!build()) return false;
53 try {
54 final Data data = context.data();
55 return update(data, () -> {
56 // skip update if fragment is empty
57 if(tmpData.meta.size > 1) {
58 final AtomicUpdateCache auc = new AtomicUpdateCache(data);
59 auc.addInsert(data.meta.size, -1, new DataClip(tmpData));
60 auc.execute(false);
61 }
62 return info(RES_ADDED_X, jc().performance);
63 });
64 } finally {
65 finish();
66 }
67 }
68
69 /**
70 * Builds a data clip for the document(s) to be added.

Callers

nothing calls this directly

Calls 8

buildMethod · 0.95
addInsertMethod · 0.95
executeMethod · 0.95
finishMethod · 0.95
jcMethod · 0.80
infoMethod · 0.65
dataMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected