summaryrefslogtreecommitdiff
path: root/django/core/db/backends/mysql.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/db/backends/mysql.py')
-rw-r--r--django/core/db/backends/mysql.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/core/db/backends/mysql.py b/django/core/db/backends/mysql.py
index e7ede84a12..dd94948b96 100644
--- a/django/core/db/backends/mysql.py
+++ b/django/core/db/backends/mysql.py
@@ -84,6 +84,11 @@ class DatabaseWrapper:
self.connection.close()
self.connection = None
+ def quote_name(self, name):
+ if name.startswith("`") and name.endswith("`"):
+ return name # Quoting once is enough.
+ return "`%s`" % name
+
def get_last_insert_id(cursor, table_name, pk_name):
cursor.execute("SELECT LAST_INSERT_ID()")
return cursor.fetchone()[0]
@@ -122,11 +127,6 @@ def get_table_list(cursor):
def get_relations(cursor, table_name):
raise NotImplementedError
-def quote_name(name):
- if name.startswith("`") and name.endswith("`"):
- return name # Quoting once is enough.
- return "`%s`" % name
-
OPERATOR_MAPPING = {
'exact': '=',
'iexact': 'LIKE',