[orm-devel] select problem
Sun, 2 Mar 2003 20:44:35 +0100
>on the other hand, downcases everything, the way C programmers like it. ;-)
That's why it never showed up, I stuck to lower case identifiers.
>The problem arised, then, when the case-altered value is returned, and
>compared in python (which, of course, is case sensitive)
>Hmm, it's not FireBird that's having the problem with column names, I think:
>it's orm. Be careful about up/down casing, since the SQL spec says these
>names can be _anything_ if quoted properly:
>SELECT "#" from "My Really silly-tablename"
>is perfectly valid SQL.
ORM aims at making SQL identifiers independent from SQL
identifiers. You can use a
attribute with every datatype in your columns dict and you can set the
attribute in each of your dbclasses. The problem is, that cases in
which these are anything else but valid lowercase Python identifiers
is not tested very well. That's why the comparison issue never showed
up. Also, the SQL syntax using quotes is never used so you'd end up
having the same problem.
As you pointed out above it does not make a great deal of sense to
use anything but "Python like" identifiers in SQL. How desireble is
it for ORM to consider this case and modify the procedures that
create SQL statements accordingly?
Thanks for pointing this our Ross!
_..._ Diedrich Vorberg
/ _ _ \ http://www.tux4web.de
| (o)_(o) | firstname.lastname@example.org
\( ) / .---.
//'._.'\ \ / \ Internet Dienstleistungen
// . \ \ \.@-@./ und 'Consulting'.
|| . \ \ /`\_/`\
|\ : / | // _ \\ Linux Rules!
\ `) ' (` /_ | \ )|_
_)``".____,.'"` (_ /`\_`> <_/ \
) )'--'( ( \__/'---'\__/