Exemple #1
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   final byte[] s;
   if (exprs.length == 0) {
     final Item it = ctxValue(qc).item(qc, info);
     if (it instanceof FItem) throw FISTRING_X.get(ii, it.type);
     s = it == null ? Token.EMPTY : it.string(ii);
   } else {
     s = toEmptyToken(arg(0, qc), qc);
   }
   return Int.get(Token.length(s));
 }
Exemple #2
0
 /**
  * Returns a database function for the first node in a node set.
  *
  * @param n node set
  * @param i offset
  * @return function string
  */
 static String openPre(final Nodes n, final int i) {
   return Function._DB_OPEN_PRE.get(Str.get(n.data.meta.name), Int.get(n.pres[i])).toString();
 }
Exemple #3
0
 @Override
 public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
   ctxValue(qc);
   return Int.get(qc.focus.pos);
 }