Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread brett gardner
ahh, I was not aware that you could put where args into the "ON (...)" part of the statement. Thanks. Brandon Black wrote: >On 6/19/06, brett gardner <[EMAIL PROTECTED]> wrote: > > >>Okay here it is. >> >>my $sql = 'SELECT firms.user_id ' . >>'FROM firms LEFT JOIN (' . >>

Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread Brandon Black
On 6/19/06, brett gardner <[EMAIL PROTECTED]> wrote: > Okay here it is. > > my $sql = 'SELECT firms.user_id ' . > 'FROM firms LEFT JOIN (' . > 'SELECT firm_id,allocated_requested_query_id ' . > 'FROM allocated_requested_queries ' . > 'WHERE requested_

Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread brett gardner
Okay here it is. my $sql = 'SELECT firms.user_id ' . 'FROM firms LEFT JOIN (' . 'SELECT firm_id,allocated_requested_query_id ' . 'FROM allocated_requested_queries ' . 'WHERE requested_query_id=?' . ') AS restricted_alloc_queries ON restricte

Re: [Dbix-class] HOWTO: functions in update

2006-06-19 Thread Matt S Trout
Krzysztof Krzyzaniak wrote: > Now I have something like; > > my $row = $c->model('SireDB::Article')->find($result->params->{'id'}); > if ($row->id == $result->params->{'id'}) > { > $row->body($result->params->{'editarea'}); > $row->title($result->params->{'title'}); > $row->chang

[Dbix-class] HOWTO: functions in update

2006-06-19 Thread Krzysztof Krzyzaniak
Now I have something like; my $row = $c->model('SireDB::Article')->find($result->params->{'id'}); if ($row->id == $result->params->{'id'}) { $row->body($result->params->{'editarea'}); $row->title($result->params->{'title'}); $row->changed( localdate(time) ); $row->u

Re: [Dbix-class] [Catalyst] They gave us BoF space! (YACP::EU 2006)

2006-06-19 Thread Daniel McBrearty
I'd very much like to get over, be nice to put names to faces over a pint as much as anything. Whether it can actually happens is another thing. Requires time off for good behaviour on several fronts ... don't know if I'm capable of behaving that well for that long ;-) if not, have a beer for me .

Re: [Dbix-class] [Catalyst] They gave us BoF space! (YACP::EU 2006)

2006-06-19 Thread Matt S Trout
Dami Laurent (PJ) wrote: > > So, who's turning up then? > > Hi, > > I'm definitely interested in meeting you guys, so I will show up. But there > are also some nice talks at the same time, so I'll do some zapping. > > Is this BoF intended as an intersection between Catalyst and DBIx::Class >

Re: [Dbix-class] DBIx::Class or Rose::DB::Object or other???

2006-06-19 Thread Matt S Trout
Jesper Krogh wrote: > Matt S Trout wrote: >>> 1. RDBO is faster. >>> 2. DBIC has a Class::DBI compatibility layer that will make the >>> transition from CDBI easier >> RDBO is much faster on the perl side; in a majority of situations you >> can generate SQL that's just as efficient on the databas

Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread Matt S Trout
brett gardner wrote: > Is there anyway to get access to the database connection object used by > Storage to run a literal sql command. > > I have an extremely complicated SQL query that involving a left join on > a sub query, and then multiple exists on sub queries that I cannot for > the life

Re: [Dbix-class] DBIx::Class or Rose::DB::Object or other???

2006-06-19 Thread Guillermo Roditi
To be fair, RDBO has a nasty load time as well. If you really really need fast loading from perlscripts then you might as well just use plain vanilla DBIOn 6/19/06, Jesper Krogh <[EMAIL PROTECTED]> wrote:Matt S Trout wrote: >> 1. RDBO is faster.>> 2. DBIC has a Class::DBI compatibility layer that

Re: [Dbix-class] They gave us BoF space! (YACP::EU 2006)

2006-06-19 Thread Thomas Klausner
Hi! On Fri, Jun 16, 2006 at 06:43:36PM +0100, Matt S Trout wrote: > http://www.birmingham2006.com/cgi-bin/yapc.pl?act=talk-item&talkid=77 > > So, who's turning up then? Probably me, unless other tracks are more interesting/job releated (like the POE-talk) -- #!/usr/bin/perl

Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread Brett Gardner
Thanks. I read the storage POD, but didn't see it. I blame the world cup. Thomas Klausner wrote: >Hi! > >On Mon, Jun 19, 2006 at 05:06:51PM +1000, brett gardner wrote: > > >>Is there anyway to get access to the database connection object used by >>Storage to run a literal sql command. >> >

Re: [Dbix-class] They gave us BoF space! (YACP::EU 2006)

2006-06-19 Thread Jess Robinson
Me... I hope ;) Jess On Fri, 16 Jun 2006, Matt S Trout wrote: > http://www.birmingham2006.com/cgi-bin/yapc.pl?act=talk-item&talkid=77 > > So, who's turning up then? > > -- > Matt S Trout Offering custom development, consultancy and support > Technical Directorcontracts for

Re: [Dbix-class] Access to the database connection object

2006-06-19 Thread Thomas Klausner
Hi! On Mon, Jun 19, 2006 at 05:06:51PM +1000, brett gardner wrote: > Is there anyway to get access to the database connection object used by > Storage to run a literal sql command. I think it's $db->storage->dbh (at least that's what I'm using for some time now..) -- #!/usr/bin/perl

[Dbix-class] Access to the database connection object

2006-06-19 Thread brett gardner
Is there anyway to get access to the database connection object used by Storage to run a literal sql command. I have an extremely complicated SQL query that involving a left join on a sub query, and then multiple exists on sub queries that I cannot for the life of me get to work using SQL::Abst