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

Method rename

basex-core/src/main/java/org/basex/query/QueryParser.java:4306–4318  ·  view source on GitHub ↗

Parses the "RenameExpr" rule. @return query expression or null @throws QueryException query exception

()

Source from the content-addressed store, hash-verified

4304 * @throws QueryException query exception
4305 */
4306 private Expr rename() throws QueryException {
4307 final int p = pos;
4308 if(!wsConsumeWs(RENAME) || !wsConsumeWs(NODE) && !wsConsumeWs(NODES)) {
4309 pos = p;
4310 return null;
4311 }
4312
4313 final Expr trg = check(single(), INCOMPLETE);
4314 wsCheck(AS);
4315 final Expr n = check(single(), INCOMPLETE);
4316 qc.updating();
4317 return new Rename(info(), trg, n);
4318 }
4319
4320 /**
4321 * Parses the "ReplaceExpr" rule.

Callers 1

singleMethod · 0.95

Calls 6

wsConsumeWsMethod · 0.95
checkMethod · 0.95
singleMethod · 0.95
wsCheckMethod · 0.95
infoMethod · 0.95
updatingMethod · 0.45

Tested by

no test coverage detected