Re: [Dbix-class] Get generated SQL

2008-03-12 Thread Matt Lawrence
Mark Lawrence wrote: On Wed Mar 12, 2008 at 03:37:33PM +, Matt Lawrence wrote: Mark Lawrence wrote: On Wed Mar 12, 2008 at 12:30:14PM +, Matt Lawrence wrote: Yes, the escaping would make the data safe/suitable for the database, but that won't change the effects

Re: [Dbix-class] Get generated SQL

2008-03-11 Thread Matt Lawrence
Matt Lawrence wrote: Matt S Trout wrote: Interesting. Have you considered writing some code to interpolate the bind parameters? For copy+paste into an SQL CLI prompt it's a bit inconvenient to substitute the ?s manually. I was contemplating it, but never got around to it. (we're

Re: [Dbix-class] Get generated SQL

2008-03-11 Thread Matt Lawrence
Ash Berlin wrote: On 11 Mar 2008, at 16:39, Matt Lawrence wrote: I found some time last night to work on this. I put the tests in a new file t/as_sql.t, they are pretty basic: just calling each new method once and checking the output is as expected There are now 2 cursor methods

Re: [Dbix-class] chained 'search' then 'update'

2008-03-05 Thread Matt Lawrence
Angel Kolev wrote: Hi, all. I have a table with fields 'id' and 'status'. Status is ENUM field with values 'active' and 'backup'. I need somethink like(i use dbic in catalyst): my $rs = $c-model('ModelDB::CheckMap')-search({id = $id})-update('status','backup'); $rs-create({%params}); I

Re: [Dbix-class] chained 'search' then 'update'

2008-03-05 Thread Matt Lawrence
Matt Lawrence wrote: Angel Kolev wrote: Hi, all. I have a table with fields 'id' and 'status'. Status is ENUM field with values 'active' and 'backup'. I need somethink like(i use dbic in catalyst): my $rs = $c-model('ModelDB::CheckMap')-search({id = $id})-update('status','backup'); $rs

Re: [Dbix-class] Prefetch Problem: Related data can't be fetched

2008-02-26 Thread Matt Lawrence
[EMAIL PROTECTED] wrote: Hi, I am having a problem, in which I couldn't get the relationship column data by using prefetch. My relationship is declared like this, suppose we have two tables: railway and railway_station, which relationship is 1 to many. #in railway schema

Re: [Dbix-class] Prefetch Problem: Related data can't be fetched

2008-02-26 Thread Matt Lawrence
Jess Robinson wrote: On Tue, 26 Feb 2008, Matt Lawrence wrote: [EMAIL PROTECTED] wrote: Hi, I am having a problem, in which I couldn't get the relationship column data by using prefetch. My relationship is declared like this, suppose we have two tables: railway and railway_station, which

Re: [Dbix-class] Using result_source for custom query breaks with -deploy

2008-01-31 Thread Matt Lawrence
J. Shirley wrote: Hey all, Easy patch for this, but wanted to make sure that I wasn't missing anything at all. I have a custom result source instance to do a big query (subselect) as what is described in the cookbook. Works like a champ. Except, I can't -deploy anymore. When it iterates