[Dbix-class] Complex(ish) select statement => DBIx::Class method
Rob Kinyon
rob.kinyon at gmail.com
Thu Mar 12 15:53:11 GMT 2009
These look to be subqueries in a SELECT clause. subqueries are
supported in the latest dev release.
Rob
On Thu, Mar 12, 2009 at 11:23, fREW Schmidt <frioux at gmail.com> wrote:
> Hello friends!
>
> We have the following SQL:
>
>> (select date from logParents where id = 62),
>> (select max(logstatus.date) from logstatus
>> join logChildren on logChildren.id = logStatus.child_id
>> join logParents on logParents.id = logChildren.parent_id
>> where parent_id = 62)
>> ) as elapsed
>
> We'd like to make it a method for the logParent, so one could just do
> $parent->elapsed_ms or something like that. We are kindav at a loss as to
> how to do this. Any tips at all would be extremely helpful.
>
> Thanks!
>
> --
> fREW Schmidt
> http://blog.afoolishmanifesto.com
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
>
--
Thanks,
Rob Kinyon
More information about the DBIx-Class
mailing list