Hi,I'm just getting up to speed on DBIx::Class as a precursor to doing Great Things (I hope) with Catalyst. When I do that kind of thing, I like to do all of the examples so I can really understand them. It all makes sense with the exception of the join in the result set call.
First, the example
On 6/22/06, Justin Guenther [EMAIL PROTECTED] wrote:
On 6/22/06, Alex Beamish [EMAIL PROTECTED] wrote: Here's the first one that has me stumped .. # SELECT me.cdid, me.artist, me.title # FROM cd me
#LEFT JOIN track tracks ON ( tracks.cd = me.cdid )#WHERE ( tracks.title = ? ) #(`Stan') sub
Alex Beamish wrote:
So join = 'tracks' doesn't mean join to the `tracks' table, it means
join to the `tracks' relationship, which happens to exist on the
`track' table. Just like in the first example you gave `cd' didn't
refer to a table, it referred to a relationship that
* Ash Berlin [EMAIL PROTECTED] [2006-06-22 13:50]:
As for a go at taking that contrived CASE clause:
{ case = [ [ age = '' = 18 = 'NULL'], [age = '' = 45 =
'NULL'], ['age'] ] }
Possible with WHEN/ELSE keys:
{ case = [ { where = 'age' = '' = 18 = 'NULL'}, {where =
'age' = '' = 45 =
A. Pagaltzis wrote:
* Ash Berlin [EMAIL PROTECTED] [2006-06-22 13:50]:
As for a go at taking that contrived CASE clause:
{ case = [ [ age = '' = 18 = 'NULL'], [age = '' = 45 =
'NULL'], ['age'] ] }
Possible with WHEN/ELSE keys:
{ case = [ { where = 'age' = '' = 18 = 'NULL'}, {where =
* Ash Berlin [EMAIL PROTECTED] [2006-06-23 01:40]:
A. Pagaltzis wrote:
Errm, seriously: you find that more readable than literal
SQL?
No, just more portable. What if you change the table name but
forget to change it one place in your code, or add an age
column to another table etc. etc.
On 6/22/06, Ash Berlin [EMAIL PROTECTED] wrote:
Alex Beamish wrote: So join = 'tracks' doesn't mean join to the `tracks' table, it means join to the `tracks' relationship, which happens to exist on the `track' table. Just like in the first example you gave `cd' didn't
refer to a table, it
MySQL has a mod to INSERT where you can do:
INSERT key_field = '$key_value',
some_field = 1
ON DUPLICATE KEY UPDATE some_field = some_field + 1
In a multi-connection system, this is really handy for the
initial insert of some
I get a mysql sentence like REPLACE DELAYED table_name SET a = 'b', c =
'd'
how to write this in DBIx-Class. should I get -storage-dbh?
Thanks.
--
Fayland Lam // http://www.fayland.org/
___
List: