On 12/23/05 11:38 PM, Cees Hek wrote: > On 12/23/05, John Siracusa <[EMAIL PROTECTED]> wrote: >> With the new "arbitrary-depth joins" feature, you can join as deep as you'd >> like. The syntax I'm using for this feature right now is a chain of >> relationship names, with "." between each one. Example: >> >> $products = >> Product::Manager->get_products( >> require_objects => [ 'vendor.addresses.state' ]); > > [...] As for the syntax above, I think it could be potentially confusing, > since a . is also used to separate a table name/alias from a column > (ie vendor.name or t2.name).
Hm, good point. OTOH, the things in this list are not table names. They're relationship names, which are basically arbitrary and don't have to match up with table names at all. But I can see how the similar syntax could lead someone to the wrong conclusion. > Here are a few other options: > > require_objects => [ 'vendor..addresses..state' ]); > require_objects => [ 'vendor^addresses^state' ]); > require_objects => [ 'vendor&addresses&state' ]); > > Or to make it a bit more visually distinctive, maybe allow some > optional whitespace: > > require_objects => [ 'vendor & addresses & state' ]); I like the optional whitespace (although it does further constrain the world of possible relationship names, I suppose). I don't like the & because it looks like a logical operation to me. In the same way, ".." looks "range-y"...and "^" looks just plain weird :) How about this one? require_objects => [ 'vendor > addresses > state' ]); That's a bit less noisy than the arrows: require_objects => [ 'vendor -> addresses -> state' ]); although it does look a bit worse without the spaces: require_objects => [ 'vendor>addresses>state' ]); require_objects => [ 'vendor->addresses->state' ]); I still really like the dots though...maybe I'll make them an alternate syntax form no matter what I choose :) Any more opinions? -John ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object