debug/1 (#2710)
* debug/1 This def ensures the output of debug(m1,m2) is kept together. Closes #2709 #2111 #2112
This commit is contained in:
1 parent
4b1ac7c95f
commit
07ef97c414
3 files changed
+75
-7
No files matched your search
@@ -266,6 +266,9 @@ def pick(pathexps):
|
||||
| reduce path(pathexps) as $a (null;
|
||||
setpath($a; $in|getpath($a)) );
|
||||
|
||||
# ensure the output of debug(m1,m2) is kept together:
|
||||
def debug(msgs): (msgs | debug | empty), .;
|
||||
|
||||
# SQL-ish operators here:
|
||||
def INDEX(stream; idx_expr):
|
||||
reduce stream as $row ({}; .[$row|idx_expr|tostring] = $row);
|
||||
|
||||
Reference in new issue
Block a user