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

Method init

basex-core/src/main/java/org/basex/core/cmd/AQuery.java:190–204  ·  view source on GitHub ↗

Initializes the query processor. @param ctx database context @throws QueryException query exception

(final Context ctx)

Source from the content-addressed store, hash-verified

188 * @throws QueryException query exception
189 */
190 private void init(final Context ctx) throws QueryException {
191 if(qp != null) return;
192
193 if(info == null) info = new QueryInfo(ctx);
194 else info.reset();
195
196 qp = pushJob(new QueryProcessor(query, uri, ctx, info));
197
198 for(final Entry<String, Entry<Object, String>> entry : bindings.entrySet()) {
199 final Entry<Object, String> value = entry.getValue();
200 qp.variable(entry.getKey(), value.getKey(), value.getValue());
201 }
202 qp.parse();
203 qp.compile();
204 }
205
206 /**
207 * Generates a query plan.

Callers 4

runMethod · 0.95
parametersMethod · 0.95
updatingMethod · 0.95
buildMethod · 0.45

Calls 7

pushJobMethod · 0.80
getKeyMethod · 0.80
resetMethod · 0.65
compileMethod · 0.65
getValueMethod · 0.45
variableMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected