Ticket #11814: multidb-0.1.patch

File multidb-0.1.patch, 2.0 KB (added by asd, 15 years ago)
  • django/contrib/gis/db/models/sql/where.py

     
    7878            annotation = GeoAnnotation(field, value, where)
    7979            return super(WhereNode, self).add(((obj.alias, col, field.db_type()), lookup_type, annotation, params), connector)
    8080
    81     def make_atom(self, child, qn):
     81    def make_atom(self, child, qn, connection):
    8282        obj, lookup_type, value_annot, params = child
    8383
    8484        if isinstance(value_annot, GeoAnnotation):
     
    9494        else:
    9595            # If not a GeometryField, call the `make_atom` from the
    9696            # base class.
    97             return super(GeoWhereNode, self).make_atom(child, qn)
     97            return super(GeoWhereNode, self).make_atom(child, qn, connection)
    9898
    9999    @classmethod
    100100    def _check_geo_field(cls, opts, lookup):
  • django/contrib/gis/db/models/sql/query.py

     
    9898                        aliases.add(r)
    9999                        col_aliases.add(col[1])
    100100                else:
    101                     result.append(col.as_sql(quote_func=qn))
     101                    result.append(col.as_sql(qn=qn))
    102102
    103103                    if hasattr(col, 'alias'):
    104104                        aliases.add(col.alias)
     
    112112
    113113        result.extend([
    114114                '%s%s' % (
    115                     self.get_extra_select_format(alias) % aggregate.as_sql(quote_func=qn),
     115                    self.get_extra_select_format(alias) % aggregate.as_sql(qn=qn, connection=self.connection),
    116116                    alias is not None and ' AS %s' % alias or ''
    117117                    )
    118118                for alias, aggregate in self.aggregate_select.items()
Back to Top