On Tue, Dec 15, 2009 at 4:15 PM, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > Hey folks -- > > Forgot to mention it during the sprint this weekend, but I've pushed a > RC patch to #11863, Model.objects.raw(). If anyone's got any feedback, > let it fly. Otherwise, I'll be checking this in in a couple-three days > or so.
====== InsuficientFields -> InsufficientFields ====== This bit doesn't seem to be true; It seems that missing fields will raise InsuficientFields instead. Am I reading it wrong? " The ``Person`` objects returned by this query will have their ``first_name`` attributes set correctly, but *will not have any other model fields set*. This means that accessing ``last_name`` or ``birth_date`` will result in an ``AttributeError``. " ====== RawQuery.__len__ calls _populate_cache twice. I see the comment about SQLite, but if that was intended, why not just use len(self._cache) to start with, since _populate_cache does .fetchall()? ====== RawQuery._populate_cache does fetchall(). This is sort of surprising, since normal QuerySets go out of their way to avoid fetchall. RawQuerySets are not as lazy as normal querysets in that normal querysets do fetchmany. If this was intended, it might be worth pointing out. In fact, I think RawQuerySet.iterator won't do what people expect. ====== On "admonition:: Model table names" - Person._meta.db_table would have the value, and it might be better to be more explicit about it. But it's an "_" API, so maybe we don't want to make it clearer after all. ;-) ====== "You'll use ``%s``" Is that back-end independent? It looks like it gets evaluated by whatever backend you're using, and so would depend on DB-API paramstyle. ====== Typo here: "It's tempting to write the above query as:: " >>> query = 'SELECT * FROM myapp_person WHERE last_name = %s', % lname) -> >>> query = 'SELECT * FROM myapp_person WHERE last_name = %s' % lname Or did you make it bad syntax on purpose? ====== RawQuery.validate_sql excludes anything but selects, but Oracle uses comments to do query hinting. Can an Oracle person confirm that those hints can't start the query SQL? (Not worth holding up landing, of course.) ====== -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.