Skip to content

Commit 7526015

Browse files
committed
patching Exists expression for intersystems
1 parent f66c91b commit 7526015

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

django_iris/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from django.db.models.expressions import Exists
2+
3+
def exists_as_intersystems(self, compiler, connection, template=None, **extra_context):
4+
template = "(SELECT COUNT(*) FROM (%(subquery)s))"
5+
return self.as_sql(compiler, connection, template, **extra_context)
6+
7+
Exists.as_intersystems = exists_as_intersystems
8+

0 commit comments

Comments
 (0)