Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Tom Schindl
Tim Bunce wrote: On Tue, Jan 10, 2006 at 12:47:54PM +0100, Peter J. Holzer wrote: or selectall_arrayhashref? Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the

Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Tim Bunce
On Wed, Jan 11, 2006 at 10:37:58AM +0100, Tom Schindl wrote: Tim Bunce wrote: Anything wrong with the existing my $emp = $dbh-selectall_arrayref(..., { Slice = {} }); ? Please spread the word. Way too many people seem to not know about this! Maybe if there would be an example like

Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Tom Schindl
and here's the proposed patch hopefully my english is good enough. Tom Index: DBI.pm === --- DBI.pm (Revision 2381) +++ DBI.pm (Arbeitskopie) @@ -4014,7 +4014,17 @@ In which case the array is copied and each value decremented before

Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Peter J. Holzer
On 2006-01-11 10:34:21 +0100, Peter J. Holzer wrote: On 2006-01-10 17:17:21 +, Tim Bunce wrote: Anything wrong with the existing my $emp = $dbh-selectall_arrayref(..., { Slice = {} }); ? Nothing, except that I didn't know about it. Looks like it was too obvious for me

Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Peter J. Holzer
On 2006-01-10 17:17:21 +, Tim Bunce wrote: On Tue, Jan 10, 2006 at 12:47:54PM +0100, Peter J. Holzer wrote: Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that

Re: Convenience function selectall_hasharrayref

2006-01-11 Thread Tim Bunce
Great. Thanks Tom. Tim. On Wed, Jan 11, 2006 at 01:10:43PM +0100, Tom Schindl wrote: and here's the proposed patch hopefully my english is good enough. Tom Index: DBI.pm === --- DBI.pm(Revision 2381) +++ DBI.pm

Convenience function selectall_hasharrayref

2006-01-10 Thread Peter J. Holzer
or selectall_arrayhashref? Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the order is preserved, and the columns can be accessed by name. Proposed use: my $emp =

Re: Convenience function selectall_hasharrayref

2006-01-10 Thread John Scoles
Peter J. Holzer wrote or selectall_arrayhashref? Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the order is preserved, and the columns can be accessed by name.

Re: Convenience function selectall_hasharrayref

2006-01-10 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the order is preserved, and the columns can be accessed by name.

Re: Convenience function selectall_hasharrayref

2006-01-10 Thread JupiterHost.Net
Peter J. Holzer wrote: or selectall_arrayhashref? Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the order is preserved, and the columns can be accessed by name.

Re: Convenience function selectall_hasharrayref

2006-01-10 Thread Tim Bunce
On Tue, Jan 10, 2006 at 12:47:54PM +0100, Peter J. Holzer wrote: or selectall_arrayhashref? Anyway, I rather frequently find that the most natural way to represent a query result is an array of hashes: Each row is hashref, but the the rows are in an array(ref) so that the order is