Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implemented quote_name() for ado_mssql DB backend. Thanks, Jakub Laba…

…th and Eugene Lazutkin

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 565a19470204bddde62a17537666eb6e3c9be852 1 parent 632b63a
Adrian Holovaty adrianholovaty authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/core/db/backends/ado_mssql.py
5 django/core/db/backends/ado_mssql.py
View
@@ -111,8 +111,9 @@ def get_relations(cursor, table_name):
raise NotImplementedError
def quote_name(name):
- # TODO: Figure out how MS-SQL quotes database identifiers.
- return name
+ if name.startswith('[') and name.endswith(']'):
+ return name # Quoting once is enough.
+ return '[%s]' % name
OPERATOR_MAPPING = {
'exact': '=',
Please sign in to comment.
Something went wrong with that request. Please try again.