summaryrefslogtreecommitdiff
path: root/django/db/backends/base/operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/base/operations.py')
-rw-r--r--django/db/backends/base/operations.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py
index d2bc336dd8..6f10e31cd5 100644
--- a/django/db/backends/base/operations.py
+++ b/django/db/backends/base/operations.py
@@ -8,6 +8,7 @@ import sqlparse
from django.conf import settings
from django.db import NotSupportedError, transaction
from django.db.backends import utils
+from django.db.models.expressions import Col
from django.utils import timezone
from django.utils.encoding import force_str
@@ -776,3 +777,9 @@ class BaseDatabaseOperations:
def on_conflict_suffix_sql(self, fields, on_conflict, update_fields, unique_fields):
return ""
+
+ def prepare_join_on_clause(self, lhs_table, lhs_field, rhs_table, rhs_field):
+ lhs_expr = Col(lhs_table, lhs_field)
+ rhs_expr = Col(rhs_table, rhs_field)
+
+ return lhs_expr, rhs_expr