Creates a new, optimized map expression. @param cc compilation context @param info input info (can be null) @param exprs expressions @return list, single expression or empty sequence @throws QueryException query exception
(final CompileContext cc, final InputInfo info, final Expr... exprs)
| 48 | * @throws QueryException query exception |
| 49 | */ |
| 50 | public static Expr get(final CompileContext cc, final InputInfo info, final Expr... exprs) |
| 51 | throws QueryException { |
| 52 | final int el = exprs.length; |
| 53 | return el > 1 ? new CachedMap(info, exprs).optimize(cc) : el > 0 ? exprs[0] : Empty.VALUE; |
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public final Expr optimize(final CompileContext cc) throws QueryException { |
no test coverage detected