[Dbix-class] single field in resultset?
Michael Higgins
linux at evolone.org
Thu Dec 6 21:04:53 GMT 2007
On Thu, 6 Dec 2007 11:38:33 -0800
"Mark Blythe" <list at markblythe.com> wrote:
> Michael,
>
> See the 'columns' attribute or the 'select / as' attribute combo. For
> example:
>
> $schema->resultset('Foo')->search(
> { id => { -in => [ 1, 2, 3 ] } },
> { columns => [ 'id', 'title' ] }
> );
>
> It's covered in more detail in the ATTRIBUTES section of the
> DBIx::Class::ResultSet perldocs. There are also some examples in
> DBIx::Class::Manual::Cookbook under 'Using specific columns'.
Thanks folks!
I wound up with this:
my $result = [$schema->resultset('DB::DATA')->search(
'Bill To' => 'ACME Crap',
{ columns =>['Consignee'],
prefetch =>'Consignee',
})];
Cheers,
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org
More information about the DBIx-Class
mailing list