Author: russellm
Date: 2010-04-02 09:44:16 -0500 (Fri, 02 Apr 2010)
New Revision: 12907

Modified:
   django/trunk/django/db/models/sql/query.py
Log:
Fixed #12429 -- Modified RawQuery to provide some facilities required by 
Oracle. Thanks to Karen Tracey for the testing help.

Modified: django/trunk/django/db/models/sql/query.py
===================================================================
--- django/trunk/django/db/models/sql/query.py  2010-04-01 16:57:23 UTC (rev 
12906)
+++ django/trunk/django/db/models/sql/query.py  2010-04-02 14:44:16 UTC (rev 
12907)
@@ -37,9 +37,24 @@
         self.using = using
         self.cursor = None
 
+        # Mirror some properties of a normal query so that
+        # the compiler can be used to process results.
+        self.low_mark, self.high_mark = 0, None  # Used for offset/limit
+        self.extra_select = {}
+        self.aggregate_select = {}
+
     def clone(self, using):
         return RawQuery(self.sql, using, params=self.params)
 
+    def convert_values(self, value, field, connection):
+        """Convert the database-returned value into a type that is consistent
+        across database backends.
+
+        By default, this defers to the underlying backend operations, but
+        it can be overridden by Query classes for specific backends.
+        """
+        return connection.ops.convert_values(value, field)
+
     def get_columns(self):
         if self.cursor is None:
             self._execute_query()

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to