[Dbix-class] equivalent of DBI's selectall_hashref in DBIC?

Fernan Aguero fernan.aguero at gmail.com
Fri Dec 19 19:34:49 GMT 2008


Hi,

I'd like to fetch data from DBIC in the form of a hash (i.e. indexed
by a key, say a PK) instead of in the form of an array, which is the
native structure of a DBIC RS.

In plain DBI, I can do it using selectall_hashref, and specifying the
column to use as the hash key.

Can I do something like this in DBIC? I've looked through the docs and
couldn't find anything, but perhaps there's something very obvious
that is elluding me ...

Cheers,

-- 
fernan



More information about the DBIx-Class mailing list