theres work going on in ticket 512 to address this, so the try/ 
excepts are already gone :).

however for the casing, are you just interested in row.keys() being  
accurate, or are you actually trying to target multiple columns in a  
single row with the same name but different cases ?

with regards to row.keys(), it should likely be derived from  
cursor.description.  however db's like oracle and firebird will force  
them to be uppercase in most if not all cases, so dont expect  
consistent results in your application if you want to be database- 
agnostic.


On Mar 24, 2007, at 2:07 PM, Mel Collins wrote:

>
>  ResultProxy objects always convert column names to lower case, which
> means you can't easily extract accurate column names from RowProxy
> objects AFAICT. I'd like to be able to do:
>  dict(table.select().execute().fetchone())
>  ...and have the keys maintain the case they have in the database.
>  Was there a reason, other than case-insensitive column referencing,
> why ResultProxy was implemented in this way? Have I missed some nuance
> in the code?
>
>  I've just modified my copy of SA (0.3.6) to remove all those .lower()
> calls in ResultProxy (and also replaced all those try/excepts), and
> all my stuff built on SA still seems to work.
>  One of the unit tests now fails though (in addition to
> constraints.ConstraintTest, which failed already) -
> inheritance5.RelationTest3 ("self-referential relationships on
> polymorphic mappers"). There are no uppercase characters in the column
> names in that test, so I'm at a loss...
>
>  Any thoughts/alternate implementations?
>
>  Takk,
>  - Mel C
>
>
> >


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