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' ]);

Hi all,

I'm new here on the list (checking things out from the Class::DBI camp
and I like what I am seeing so far)

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).  I think it would be clearer if a
different symbol was used.

> I'm pretty happy with that syntax, but I've also been considering the use of
> "arrows" like this:
>
>     $products =
>       Product::Manager->get_products(
>         require_objects => [ 'vendor->addresses->state' ]);

I like that better.

> That's more typing, but it might be a bit better at conveying the link
> relationship.  Then again, it also has more visual noise.

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' ]);

Cheers,

Cees Hek


-------------------------------------------------------
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_idv37&alloc_id865&op=click
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to