Exemple #1
0
 /**
  * Parses the query.
  *
  * @param p performance
  * @throws QueryException query exception
  */
 private void parse(final Performance p) throws QueryException {
   qp.http(http);
   for (final Entry<String, String[]> entry : vars.entrySet()) {
     final String name = entry.getKey();
     final String[] value = entry.getValue();
     if (name == null) qp.context(value[0], value[1]);
     else qp.bind(name, value[0], value[1]);
   }
   qp.parse();
   if (p != null) info.parsing += p.time();
 }
Exemple #2
0
 /**
  * Binds a variable.
  *
  * @param name name of variable (if {@code null}, value will be bound as context value)
  * @param value value to be bound
  * @param type type
  * @return reference
  */
 public AQuery bind(final String name, final String value, final String type) {
   vars.put(name, new String[] {value, type});
   return this;
 }