thats a good point. although you can use any literal name for a
column name:
mytable.c["somecolumn"]
but if you want to go the "key" route we can, but im pretty sure
theres going to be a lot of new ORM bugs that will need repairing.
most of the effort with this ticket is the testing part of it.
On Jul 31, 2006, at 5:13 PM, Aaron Spike wrote:
> Michael Bayer wrote:
>> the "key" argument to column doesnt work very well when you get into
>> crazier mapping scenarios; there arent a lot of test cases that
>> use it
>> and it complicates things. it would be better if identifiers
>> knew to
>> quote themselves in a database-agnostic manner.
>
> The problem is that there are identifiers that are legal in SQL
> that are
> illegal in python when unquoted. Likewise if you were to sanitize such
> identifiers into legal python, you lose information and will be unable
> to reconstruct the proper identifier for the database.
>
> CREATE TABLE "WorstCase" (
> id SERIAL PRIMARY KEY,
> lowercase varchar(25),
> UPPERCASE varchar(25),
> MixedCase varchar(25),
> "ASC" varchar(25),
> "desc" varchar(25),
> "Union" varchar(25),
> "MixedCase" varchar(25),
> "With Space" varchar(25),
> "1st" varchar(25),
> "Similar..?" varchar(25),
> "Similar..#" varchar(25),
> ":symbol" varchar(25),
> "inner""quote" varchar(25)
> );
>
> Aaron Spike
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users