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

Method query

basex-api/src/main/java/org/basex/http/rest/RESTQuery.java:43–58  ·  view source on GitHub ↗

Evaluates the specified query. @throws HTTPException REST exception @throws IOException I/O exception

()

Source from the content-addressed store, hash-verified

41 * @throws IOException I/O exception
42 */
43 private void query() throws IOException {
44 final HTTPConnection conn = session.conn;
45 final SerializerOptions sopts = conn.sopts();
46 context.options.set(MainOptions.SERIALIZER, sopts);
47 context.setExternal(conn.requestCtx);
48 conn.initResponse();
49
50 final OutputStream os = conn.response.getOutputStream();
51 for(final Command cmd : session) {
52 if(cmd instanceof final XQuery xq) {
53 sopts.assign(xq.parameters(context));
54 conn.initResponse();
55 }
56 run(cmd, os);
57 }
58 }
59
60 /**
61 * Creates a new instance of this command.

Callers 1

run0Method · 0.95

Calls 8

soptsMethod · 0.95
initResponseMethod · 0.95
assignMethod · 0.95
getOutputStreamMethod · 0.80
setMethod · 0.65
runMethod · 0.65
setExternalMethod · 0.45
parametersMethod · 0.45

Tested by

no test coverage detected