Initializes the query processor. @param ctx database context @throws QueryException query exception
(final Context ctx)
| 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. |