On 10/10/05 9:16 AM, Uwe Voelker wrote:
>> Did you try it? :)  I already do expansion (and sometimes compression to tN
>> aliases) within sort_by strings.
> 
> Yes. "sort_by => 'id'" did not work, error came from DBI, was "ORDER BY
> id" - so no expansion at all.
> (All three tables had the 'id' column.)

Oh yeah, that is one difference.  I'll handle relationship name prefixes,
but adding prefixes where none exist means detecting where the column names
begin.  That starts to require actual SQL parsing, which I want to avoid.

> Please make the common case (sort by one column of the main object)
> quite short.
> 
> Note: I did not say "as short as possible" :-)

This isn't "quite short"? :)

    sort_by => 't1.id'

I guess if I see /^\w+(\s+ASC|DESC)?$/i I can add a "t1." prefix, but that
will lead to an expectation that it'll work on things like this too:

    sort_by => 'FOO(id) DESC, bar.baz + t2.foo, NVL(a, 0, 1)'

and it won't :)

-John




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to