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

Method run

basex-core/src/main/java/org/basex/core/cmd/DropIndex.java:29–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 }
28
29 @Override
30 protected boolean run() {
31 final Data data = context.data();
32 final CmdIndex ci = getOption(CmdIndex.class);
33 final IndexType type;
34 if(ci == CmdIndex.TEXT) {
35 type = IndexType.TEXT;
36 data.meta.createtext = false;
37 } else if(ci == CmdIndex.ATTRIBUTE) {
38 type = IndexType.ATTRIBUTE;
39 data.meta.createattr = false;
40 } else if(ci == CmdIndex.TOKEN) {
41 type = IndexType.TOKEN;
42 data.meta.createtoken = false;
43 } else if(ci == CmdIndex.FULLTEXT) {
44 type = IndexType.FULLTEXT;
45 data.meta.createft = false;
46 } else {
47 return error(UNKNOWN_CMD_X, this);
48 }
49 data.meta.names(type, options);
50
51 return update(data, () -> {
52 drop(type, data);
53 return info(INDEX_DROPPED_X_X, type, jc().performance);
54 });
55 }
56
57 @Override
58 public void build(final CmdBuilder cb) {

Callers

nothing calls this directly

Calls 8

dropMethod · 0.95
getOptionMethod · 0.80
jcMethod · 0.80
infoMethod · 0.65
dataMethod · 0.45
errorMethod · 0.45
namesMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected