Changeset 9338
- Timestamp:
- 11/05/08 12:15:48 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/contrib/gis/db/models/sql/query.py
r8431 r9338 173 173 values = [] 174 174 aliases = self.extra_select.keys() 175 index_start = len(aliases) 175 176 # Have to set a starting row number offset that is used for 177 # determining the correct starting row index -- needed for 178 # doing pagination with Oracle. 179 rn_offset = 0 180 if SpatialBackend.oracle: 181 if self.high_mark is not None or self.low_mark: rn_offset = 1 182 index_start = rn_offset + len(aliases) 183 184 # Converting any extra selection values (e.g., geometries and 185 # distance objects added by GeoQuerySet methods). 176 186 values = [self.convert_values(v, self.extra_select_fields.get(a, None)) 177 for v, a in izip(row[ :index_start], aliases)]187 for v, a in izip(row[rn_offset:index_start], aliases)] 178 188 if SpatialBackend.oracle: 179 # This is what happens normally in Oracle 's `resolve_columns`.189 # This is what happens normally in OracleQuery's `resolve_columns`. 180 190 for value, field in izip(row[index_start:], fields): 181 191 values.append(self.convert_values(value, field)) … … 188 198 Using the same routines that Oracle does we can convert our 189 199 extra selection objects into Geometry and Distance objects. 190 TODO: Laziness.200 TODO: Make converted objects 'lazy' for less overhead. 191 201 """ 192 202 if SpatialBackend.oracle:
