Re: [Catalyst] DB Functions in the Schema

2009-08-18 Thread Trevor Phillips
On Tue, Aug 18, 2009 at 5:24 PM, Matthias Dietrich wrote: > > you could ask a single question on the irc channel like I do ;-): > irc.perl.org#dbix-class Ooh, I might give that a go when I have a minute! (And at the right time of day) > Though I don't know the answer, maybe the deflate and inflat

Re: [Catalyst] DB Functions in the Schema

2009-08-18 Thread Matthias Dietrich
Hi, Am 18.08.2009 um 04:22 schrieb Trevor Phillips: It doesn't feel quite right to subscribe to a list (DBIC ML), ask a question, then unsubscribe again. you could ask a single question on the irc channel like I do ;-): irc.perl.org#dbix-class Though I don't know the answer, maybe the def

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread Trevor Phillips
On Mon, Aug 17, 2009 at 9:31 PM, fREW Schmidt 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 s

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread Lee Aylward
I have done stuff like that in the past by using the DBIx::Class::DynamicDefault module. There may be a better way to do it, though, so it is probably worth asking on the DBIC mailing list. -- Lee On Mon, 17 Aug 2009 16:12:58 +0800 Trevor Phillips wrote: > Is there an easy way to represent a D

Re: [Catalyst] DB Functions in the Schema

2009-08-17 Thread fREW Schmidt
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. Good luck! On Aug 17, 2009 3:13 AM, "Trevor Phillips" wrote: Is there an easy way to represent a DB fun

[Catalyst] DB Functions in the Schema

2009-08-17 Thread Trevor Phillips
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 => "TIMESTA