Open FCO opened 4 years ago
maybe it could be the solution for #345
Looks like a good solution for inner joins, but tricky to extend to outer joins.
my ($left, $right) = [1, 2, 3], [1, 2, 4];
$left.map: -> $lv { |( $lv X ($right.grep( -> $rv {$lv == $rv}) || (Nil)) ) }
--> ((1 1) (2 2) (3 Nil))
For some DBOs this might be better off as a CROSS JOIN.
https://www.w3resource.com/sql/joins/cross-join.php
So that:
(Model1.^all X Model2.^all)
results in:
SELECT *
FROM Model1
CROSS JOIN Model2
That is the best match for the X metaop, BTW.
should it do something like this?