Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Squerl] now returns rows as hashes

  • Loading branch information...
commit ed1b0a26d50ff07493fbd51371a5d59595195469 1 parent 561b936
@masak authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Squerl.pm
View
6 lib/Squerl.pm
@@ -371,7 +371,11 @@ class Squerl::Database {
.open;
my $sth = $!dbh.prepare($query);
while $sth.step() == 100 {
- push @rows, [map { $sth.column_text($_) }, ^$sth.column_count()];
+ my %row;
+ # RAKUDO: Can't use hash indexing here. [perl #71064]
+ %row.push($sth.column_name($_) => $sth.column_text($_))
+ for ^$sth.column_count();
+ push @rows, {%row};
}
.close;
return @rows;
Please sign in to comment.
Something went wrong with that request. Please try again.