On Mon, Aug 17, 2009 at 9:31 PM, fREW Schmidt<[email protected]> wrote: > I don't know the answer to this off the top of my head, but I do know that > you mailed it to the wrong people :-) You are much more likey to get a good > answer if you send this to the DBIC ML.
I considered that, but the Catalyst bunch are such a friendly helpful mob, I thought I'd try here first. ^_^ It doesn't feel quite right to subscribe to a list (DBIC ML), ask a question, then unsubscribe again. > On Aug 17, 2009 3:13 AM, "Trevor Phillips" <[email protected]> > wrote: > > Is there an easy way to represent a DB function call as a named column > within a DBIx::Class schema? > > eg; > > If at the DB level I would do something like: > select updated, from_unixtime(updated) as updated2 from mytable; > ... can I have; > > __PACKAGE__->add_columns( > "updated", { data_type => "TIMESTAMP" } > "updated2", { something => "from_unixtime(updated)", etc...} > ... > ); > > Thanks. > > -- > Trevor Phillips - http://dortamur.livejournal.com/ > "On nights such as this, evil deeds are done. And good deeds, of > course. But mostly evil, on the whole." > -- (Terry Pratchett, Wyrd Sisters) > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > > -- Trevor Phillips - http://dortamur.livejournal.com/ "On nights such as this, evil deeds are done. And good deeds, of course. But mostly evil, on the whole." -- (Terry Pratchett, Wyrd Sisters) _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
