Skip to content

Commit

Permalink
Fix zero-or-one display with more recent query plans
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcs committed Oct 31, 2023
1 parent 6b7658e commit 9d05788
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/qputils.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -845,10 +845,19 @@ declare function makeZeroOrOneGraph($node as element(), $id as xs:string)
map:map()
=>map:with("_id",$id)
=>nameAndAttrs($node)
=>map:with("subject", makeGraphNodeInfo($node/plan:graph-node[1]))
=>map:with("object", makeGraphNodeInfo($node/plan:graph-node[2])),
=>map:with("subject", makeGraphNodeInfo($node/(plan:graph-node[1]|plan:subject)))
=>map:with("object", makeGraphNodeInfo($node/(plan:graph-node[2]|plan:object))),

for $c at $pos in $node/*[not(self::plan:graph-node)][1]
for $c at $pos in (
$node/plan:path/*,
$node/*[not(self::plan:graph-node)][1]
)[1]
(: for $c at $pos in ( :)
(: $node/plan:path, :)
(: $node/plan:all-nodes, :)
(: $node/*[not(self::plan:graph-node)][1] ! <plan:path>{ . }</plan:path>, :)
(: $node/*[not(self::plan:graph-node)][2] ! <plan:all-nodes>{ . }</plan:all-nodes> :)
(: )[1 to 2] :)
let $newID := concat($id, "_", $pos)
return (
let $maps := makeGraph($c,$newID)
Expand Down

0 comments on commit 9d05788

Please sign in to comment.