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

Method item

basex-core/src/main/java/org/basex/query/func/db/DbDelete.java:21–37  ·  view source on GitHub ↗
(final QueryContext qc, final InputInfo ii)

Source from the content-addressed store, hash-verified

19 */
20public final class DbDelete extends DbAccessFn {
21 @Override
22 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
23 final Data data = toData(qc);
24 final String path = toDbPath(arg(1), qc);
25
26 // delete XML resources
27 final Updates updates = qc.updates();
28 for(final int pre : data.resources.docs(path).toArray()) {
29 updates.add(new DeleteNode(pre, data, info), qc);
30 }
31 // delete file resources
32 for(final ResourceType type : Resources.BINARIES) {
33 final IOFile bin = data.meta.file(path, type);
34 if(bin != null) updates.add(new DBDelete(data, bin, info), qc);
35 }
36 return Empty.VALUE;
37 }
38}

Callers

nothing calls this directly

Calls 8

addMethod · 0.95
toDataMethod · 0.80
toDbPathMethod · 0.80
argMethod · 0.45
updatesMethod · 0.45
toArrayMethod · 0.45
docsMethod · 0.45
fileMethod · 0.45

Tested by

no test coverage detected