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

Method info

basex-core/src/main/java/org/basex/core/cmd/Info.java:42–60  ·  view source on GitHub ↗

Creates a database information string. @param context database context @return info string

(final Context context)

Source from the content-addressed store, hash-verified

40 * @return info string
41 */
42 public static String info(final Context context) {
43 final TokenBuilder tb = new TokenBuilder();
44 tb.add(GENERAL_INFO + COL + NL);
45 info(tb, VERSINFO, Prop.VERSION);
46
47 final User user = context.user();
48 info(tb, USED_MEM, Performance.formatMemory());
49
50 if(user.has(Perm.ADMIN)) {
51 final StaticOptions sopts = context.soptions;
52 tb.add(NL + GLOBAL_OPTIONS + COL + NL);
53 for(final Option<?> o : sopts) info(tb, o.name(), sopts.get(o));
54 }
55
56 final MainOptions opts = context.options;
57 tb.add(NL + LOCAL_OPTIONS + NL);
58 for(final Option<?> o : opts) info(tb, o.name(), opts.get(o));
59 return tb.toString();
60 }
61}

Callers 2

runMethod · 0.95
itemMethod · 0.95

Calls 7

addMethod · 0.95
formatMemoryMethod · 0.95
hasMethod · 0.95
toStringMethod · 0.95
nameMethod · 0.65
getMethod · 0.65
userMethod · 0.45

Tested by

no test coverage detected