>> Is there a way to access the back-end's string-quoting mechanism?
> 
> from django.db import backend
> foo_quoted = backend.quote_name('foo')

This seems to be (browsing the code) the table/field-name
escaping mechanism, not the "escaping/quoting dangerous
characters in a string so it can be put in a query" function.
The backend.quote_name function wraps a string in the back-end's
quote-chars (back-ticks in one, double-quotes in another).  The
function of interest usually doubles single-quotes, as well as
handling oddball control/unicode characters.  A little digging
shows this to be mysqldb.escape_string(), sqlite.escape, and the
psycopg.QuotedString object.


I didn't see them mentioned in any of the code in the backends/
directory.  Would a patch be considered?

-tim




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to