Ticket #17273: oracle_compiler.diff
File oracle_compiler.diff, 848 bytes (added by , 13 years ago) |
---|
-
django/db/backends/oracle/compiler.py
46 46 # and OFFSET on Oracle. 47 47 high_where = '' 48 48 if self.query.high_mark is not None: 49 high_where = ' WHERE ROWNUM <= %d' % (self.query.high_mark,)50 sql = 'SELECT * FROM (SELECT ROWNUM AS "_RN", "_SUB".* FROM (%s) "_SUB" %s) WHERE"_RN" > %d' % (sql, high_where, self.query.low_mark)49 high_where = '"_RN" <= %d AND ' % (self.query.high_mark,) 50 sql = 'SELECT * FROM (SELECT ROWNUM AS "_RN", "_SUB".* FROM (%s) "_SUB") WHERE %s"_RN" > %d' % (sql, high_where, self.query.low_mark) 51 51 52 52 return sql, params 53 53