in reply to Re: Perl 6 Junctions and Postgres SQL
in thread Perl 6 Junctions and Postgres SQL
Ok, piece by piece:
(select y from generate_series(18,23) y) (select s from generate_series(1,20) s)
Is similar to, respectively:
(18..23) (1..20)
Then this query:
select s from (1..20) where s = any( 18..23 )
Is similar in meaning to this:
for my $s (1..20) { if ($s == any(18..23) ) { print $s; } }
Or, more close in expression to the SQL, the Perl 6:
[1..20].grep:{ $_ == any(18..23) }.say
Hmm, wouldn't it be useful to have a LINQ to Hyper-operator/Junction cheat-sheet...
$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl 6 Junctions and Postgres SQL
by rhesa (Vicar) on Dec 22, 2007 at 01:36 UTC | |
by TimToady (Parson) on Dec 22, 2007 at 17:45 UTC |