Ticket #11814: multidb-0.1.patch
File multidb-0.1.patch, 2.0 KB (added by , 15 years ago) |
---|
-
django/contrib/gis/db/models/sql/where.py
78 78 annotation = GeoAnnotation(field, value, where) 79 79 return super(WhereNode, self).add(((obj.alias, col, field.db_type()), lookup_type, annotation, params), connector) 80 80 81 def make_atom(self, child, qn ):81 def make_atom(self, child, qn, connection): 82 82 obj, lookup_type, value_annot, params = child 83 83 84 84 if isinstance(value_annot, GeoAnnotation): … … 94 94 else: 95 95 # If not a GeometryField, call the `make_atom` from the 96 96 # base class. 97 return super(GeoWhereNode, self).make_atom(child, qn )97 return super(GeoWhereNode, self).make_atom(child, qn, connection) 98 98 99 99 @classmethod 100 100 def _check_geo_field(cls, opts, lookup): -
django/contrib/gis/db/models/sql/query.py
98 98 aliases.add(r) 99 99 col_aliases.add(col[1]) 100 100 else: 101 result.append(col.as_sql(q uote_func=qn))101 result.append(col.as_sql(qn=qn)) 102 102 103 103 if hasattr(col, 'alias'): 104 104 aliases.add(col.alias) … … 112 112 113 113 result.extend([ 114 114 '%s%s' % ( 115 self.get_extra_select_format(alias) % aggregate.as_sql(q uote_func=qn),115 self.get_extra_select_format(alias) % aggregate.as_sql(qn=qn, connection=self.connection), 116 116 alias is not None and ' AS %s' % alias or '' 117 117 ) 118 118 for alias, aggregate in self.aggregate_select.items()