Code

Ticket #12429: t12429-r12905.diff

File t12429-r12905.diff, 615 bytes (added by russellm, 4 years ago)

Possible fix for Oracle problems in raw_query

Line 
1diff -r 517ad2df6ce8 django/db/models/sql/query.py
2--- a/django/db/models/sql/query.py     Thu Apr 01 16:56:55 2010 +0000
3+++ b/django/db/models/sql/query.py     Fri Apr 02 22:15:33 2010 +0800
4@@ -37,6 +37,12 @@
5         self.using = using
6         self.cursor = None
7 
8+        # Mirror some properties of a normal query so that
9+        # the compiler can be used to process results.
10+        self.low_mark, self.high_mark = 0, None  # Used for offset/limit
11+        self.extra_select = {}
12+        self.aggregate_select = {}
13+
14     def clone(self, using):
15         return RawQuery(self.sql, using, params=self.params)
16