On Sun, Sep 04, 2005 at 12:56:52PM +1000, Robert Leftwich wrote:
> I'm using 0.7b1 and (attempting) to use SQLObject on an existing database
> (i.e. using fromDatabase=True in sqlmeta). What is the correct way to force
> this latest SQLObject to accept a column name with a leading underscore
> (e.g. _1col_name). I've tried setting forceDBName=True in sqlmeta w/o
> success. The error is :
>
> assert sqlbuilder.sqlIdentifier(name), 'Name must be SQL-safe (letters,
> numbers, underscores): %s (or use forceDBName=True)' \
> AssertionError: Name must be SQL-safe (letters, numbers, underscores):
> '_1col_name' (or use forceDBName=True)
from sqlobject import sqlbuilder
sqlbuilder.safeSQLRE = re.compile(r'^[a-zA-Z_][a-zA-Z0-9_\.]*$')
Ian, why does the current safeSQLRE prevent a name starts with an
underscore?
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd@???
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@???
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss