On 27/11/2007, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 27, 2007, at 11:30 AM, Yuri Pimenov wrote:
>
> >> Quote it.
>
> oh right, duh, let me answer post-coffee next time....
>
> SQLite is the reason for the truncation on the dot, and I got both
> test cases (i.e. using sqlite and you dont expect the dot, or using
> dot-separated labels and you do expect the dot) to be supported
> including with SQLite in r3836.  My main concern, which is slowing
> down of ResultProxy, doesn't seem to be an issue here...if the dot
> isnt present (the majority of cases), the truncation doesnt occur now
> so that saves time in itself.
>
>
> >>
> > I've found 'use_labels' parameter in select(). Everything is good but
> > it uses _ as separator between table and column. That makes things
> > not so easy because it is common practice to use _ in table and column
> > names.
> > Why not to use . as separator?
>
> an underscore is pretty portable and doesnt require quoting, making it
> easier to read and type.  also underscore qualified labels are
> definitely the most common practice i have seen, using ORM like
> Hibernate and others... I have never seen a quoted "tablename.colname"
> label being used before (hence it tripped me up).
>
> Also due to the sqlite issue, we necessarily have to perform a
> truncation step in the result if a dot is present in the colname, so
> if anything we gain speed by not standardizing that syntax.

You are right. I just mixed up labeling with table qualified column names.
My actual problem is that i use crossproduct select queries and i want
to distinguish between columns of different tables.

>
> >
> >
> > My other blue sky dream is about ORM and unicode column names
> > (python3.0?).
>
> we support unicode column names and table names as well as the
> databases themselves do....just go browse through the unit tests in
> test/sql/unicode.py (there are others elsewhere).   for ORM you need
> to redefine the mapped properties using ascii names (i.e. in the
> 'properties' dict) so you can access them.
Python3.0 will use unicode identifiers. So there will be no need to do
ascii -> non ascii mapping.

-- 
Yuri Pimenov

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to