Ticket #6090: django-r6816-query-whitespace.diff

File django-r6816-query-whitespace.diff, 3.7 KB (added by Stein Magnus Jodal, 16 years ago)

Patch against SVN r6816.

  • django/db/models/fields/related.py

     
    334334                cursor = connection.cursor()
    335335                cursor.execute("SELECT %s FROM %s WHERE %s = %%s AND %s IN (%s)" % \
    336336                    (target_col_name, self.join_table, source_col_name,
    337                     target_col_name, ",".join(['%s'] * len(new_ids))),
     337                    target_col_name, ", ".join(['%s'] * len(new_ids))),
    338338                    [self._pk_val] + list(new_ids))
    339339                existing_ids = set([row[0] for row in cursor.fetchall()])
    340340
     
    363363                cursor = connection.cursor()
    364364                cursor.execute("DELETE FROM %s WHERE %s = %%s AND %s IN (%s)" % \
    365365                    (self.join_table, source_col_name,
    366                     target_col_name, ",".join(['%s'] * len(old_ids))),
     366                    target_col_name, ", ".join(['%s'] * len(old_ids))),
    367367                    [self._pk_val] + list(old_ids))
    368368                transaction.commit_unless_managed()
    369369
     
    715715        if obj:
    716716            instance_ids = [instance._get_pk_val() for instance in getattr(obj, self.name).all()]
    717717            if self.rel.raw_id_admin:
    718                 new_data[self.name] = u",".join([smart_unicode(id) for id in instance_ids])
     718                new_data[self.name] = u", ".join([smart_unicode(id) for id in instance_ids])
    719719            else:
    720720                new_data[self.name] = instance_ids
    721721        else:
  • django/db/models/query.py

     
    186186        extra_select = self._select.items()
    187187
    188188        cursor = connection.cursor()
    189         cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
     189        cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ", ".join(select) + sql, params)
    190190
    191191        fill_cache = self._select_related
    192192        fields = self.model._meta.fields
     
    314314        if id_list == []:
    315315            return {}
    316316        qs = self._clone()
    317         qs._where.append("%s.%s IN (%s)" % (qn(self.model._meta.db_table), qn(self.model._meta.pk.column), ",".join(['%s'] * len(id_list))))
     317        qs._where.append("%s.%s IN (%s)" % (qn(self.model._meta.db_table), qn(self.model._meta.pk.column), ", ".join(['%s'] * len(id_list))))
    318318        qs._params.extend(id_list)
    319319        return dict([(obj._get_pk_val(), obj) for obj in qs.iterator()])
    320320
     
    616616            field_names.extend([f[0] for f in extra_select])
    617617
    618618        cursor = connection.cursor()
    619         cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
     619        cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ", ".join(select) + sql, params)
    620620
    621621        has_resolve_columns = hasattr(self, 'resolve_columns')
    622622        while 1:
  • django/db/backends/oracle/base.py

     
    232232
    233233                # LIMIT and OFFSET clauses
    234234                # To support limits and offsets, Oracle requires some funky rewriting of an otherwise normal looking query.
    235                 select_clause = ",".join(select)
     235                select_clause = ", ".join(select)
    236236                distinct = (self._distinct and "DISTINCT " or "")
    237237
    238238                if order_by:
Back to Top