> I've experimented a bit with web.db sources and managed to hack in a few
> lines of code that cause web.db methods to double-quote table and column
> names.

Are you sure that works for database engine? IIRC, MySQL uses
backquote for escaping column names. May be we this should be an
optional feature, selected by some config value. something like this:

>>> db = web.database(dbn='sqlite', db='a.db')
>>> db.insert('test', name='testing', _test=True)
<sql: "INSERT INTO test (name) VALUES ('testing')">

>>> db.quote_column_names = True
>>> db.insert('test', name='testing', _test=True)
<sql: "INSERT INTO \"test\" (\"name\") VALUES ('testing')">

I think the quote function should go as a method in DB class so that
other databases can use a different quote character. Can you also add
a testcase in tests/db.py?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to