Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 freakboy3742 authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 django/db/models/sql/query.py
15 django/db/models/sql/query.py
View
@@ -37,9 +37,24 @@ def __init__(self, sql, using, params=None):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.