Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #12429 -- Modified RawQuery to provide some facilities required…

… by Oracle. Thanks to Karen Tracey for the testing help.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8f8743a69ede47743e1aa6ab83295e35fcfd96cf 1 parent 7d5c7df
Russell Keith-Magee authored April 02, 2010

Showing 1 changed file with 15 additions and 0 deletions. Show diff stats Hide diff stats

  1. 15  django/db/models/sql/query.py
15  django/db/models/sql/query.py
@@ -37,9 +37,24 @@ def __init__(self, sql, using, params=None):
37 37
         self.using = using
38 38
         self.cursor = None
39 39
 
  40
+        # Mirror some properties of a normal query so that
  41
+        # the compiler can be used to process results.
  42
+        self.low_mark, self.high_mark = 0, None  # Used for offset/limit
  43
+        self.extra_select = {}
  44
+        self.aggregate_select = {}
  45
+
40 46
     def clone(self, using):
41 47
         return RawQuery(self.sql, using, params=self.params)
42 48
 
  49
+    def convert_values(self, value, field, connection):
  50
+        """Convert the database-returned value into a type that is consistent
  51
+        across database backends.
  52
+
  53
+        By default, this defers to the underlying backend operations, but
  54
+        it can be overridden by Query classes for specific backends.
  55
+        """
  56
+        return connection.ops.convert_values(value, field)
  57
+
43 58
     def get_columns(self):
44 59
         if self.cursor is None:
45 60
             self._execute_query()

0 notes on commit 8f8743a

Please sign in to comment.
Something went wrong with that request. Please try again.