On Wed, Dec 16, 2009 at 6:15 AM, Jacob Kaplan-Moss <[email protected]> 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.
Hi Jacob,
A couple of quick notes on the RC2 patch:
* If you have an incomplete selection of fields, the patch currently
marks those fields as None/default values. Couldn't (Shouldn't?) they
be marked as deferred fields?
* Looking slightly forward - what's the integration point for
multidb? One option is to put a using argument on raw::
Person.objects.raw('SELECT ...", using='other')
It would be nice to allow .using(), but while it is easy to allow::
Person.objects.raw('SELECT ...").using('other')
it isn't so easy to allow::
Person.objects.using('other').raw('SELECT ...")
We could jump through some hoops to put raw() on queryset, but raise
exceptions under most uses (i.e., if you've performed any query
modifying operation). However, this is a lot of hoops just to allow an
edge case API use.
Obviously, multidb isn't in scope for this patch, but given the
obvious overlap, I thought I'd ask for opinions.
Other than that, RC2 looks good to me.
Russ %-)
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.