6 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: fully qualified colu...
FromSent OnAttachments
icct27 Nov 2007 00:03 
Michael Bayer27 Nov 2007 08:09 
Yuri Pimenov27 Nov 2007 08:30 
Michael Bayer27 Nov 2007 09:07 
King Simon-NFHD7827 Nov 2007 09:07 
Yuri Pimenov27 Nov 2007 14:20 
Subject:[sqlalchemy] Re: fully qualified column names in RowProxy
From:Michael Bayer (mike@zzzcomputing.com)
Date:11/27/2007 08:09:54 AM
List:com.googlegroups.sqlalchemy

On Nov 27, 2007, at 3:04 AM, icct wrote:

Hi.

Is there a way to make RowProxy use fully qualified column names like "table.column" as keys? Even if i explicitly label column with "as" in query, RowProxy chops off anything till last dot in label.

the reason for that is because in sqlite, if you say "SELECT t2.col3, t2.col4 FROM t2", cursor.description reports the column names as u't2.col3', u't2.col4', instead of 'col3' and 'col4' like every other DBAPI would.......so we truncate against the dot.

I did a little testing and I'm not even sure how you'd even make a label with a dot in it; all three of sqlite, postgres, and mysql raise a syntax error if you try to say "select colname AS tablename.colname from tablename", so thats a pretty decent clue that its not supported by SQL.