[Dbix-class] Issues with using the as=>[...] parameter
Brandon Black
blblack at gmail.com
Fri Nov 3 00:30:46 GMT 2006
On 11/2/06, Devin Austin <devin.austin at gmail.com> wrote:
> so if i'm understanding this correctly, the following code:
> > my $user = $schema->resultset('User')->single(
> > {
> > username => $q->param('username'),
> > password => $q->param('password')
> > },
> > {
> > select => [
> > \'userid, COUNT(*) as is_authorized',
> > ],
> > }
> > );
>
> should produce "SELECT userid, COUNT(*) as is_authorized FROM user WHERE
> username=? and password=?". Correct?
>
>
Generally speaking the two should be separate, as in: select => [
'userid', \'COUNT(*) as is_authorized' ], but your example query makes
little sense to begin with...
More information about the Dbix-class
mailing list