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.


>
>
> 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.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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