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

Method run

basex-core/src/main/java/org/basex/core/cmd/Get.java:28–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 }
27
28 @Override
29 protected boolean run() {
30 final String path = MetaData.normPath(args[0]);
31 if(path == null) return error(PATH_INVALID_X, args[0]);
32
33 final Data data = context.data();
34 final int pre = data.resources.doc(path);
35 if(pre == -1) return error(RES_NOT_FOUND_X, path);
36
37 try(Serializer ser = Serializer.get(out)) {
38 ser.serialize(new DBNode(data, pre));
39 } catch(final IOException ex) {
40 return error(ex.toString());
41 }
42 return info(QUERY_EXECUTED_X_X, "", jc().performance);
43 }
44
45 @Override
46 public void addLocks() {

Callers

nothing calls this directly

Calls 9

normPathMethod · 0.95
getMethod · 0.95
jcMethod · 0.80
toStringMethod · 0.65
infoMethod · 0.65
errorMethod · 0.45
dataMethod · 0.45
docMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected