I've posted a new patch to the ticket (http://code.djangoproject.com/
ticket/11863) and have pushed my latest code to
http://github.com/SeanOC/django/tree/ticket11863. All of the issues
which Jacob raised should now be resolved and an initial version of
caching the query results has been implement
On Fri, Oct 2, 2009 at 9:37 AM, Russell Keith-Magee
wrote:
> Django's ORM is designed to make the simple cases really simple, but
> once you move beyond the basics, you really should be looking to use
> raw SQL.
Indeed. I look at raw() really as "I know *exactly* the query I want
to run, get the
On Oct 2, 7:35 pm, mrts wrote:
> But let me stop right here.
Contradicting myself, I've pursued this further and
implemented raw_override() for order_by in [1] as a proof of
concept. See [2] for what's different and tests [3] for
usage.
I'd say that for order_by, the implementation is simple an
On Oct 2, 5:42 pm, "Sean O'Connor" wrote:
> To be honest this seems like something which would be a lot of work with
> relatively little gain. For this to work raw() would need to change from a
> relatively simple bit of code which doesn't need to touch all of the complex
> query code in the ORM
To be honest this seems like something which would be a lot of work with
relatively little gain. For this to work raw() would need to change from a
relatively simple bit of code which doesn't need to touch all of the complex
query code in the ORM to a complex bit of code which needs to deeply modi
On Fri, Oct 2, 2009 at 7:35 PM, mrts wrote:
>
> Wishful thinking follows.
>
> It would be awesome if one could mix ordinary QuerySet methods
> with raw() (or, rather, raw_extra(), see below for that).
While I can see what you're aiming at here, I'm not really a fan of the idea.
Django's ORM is
On Tue, Sep 29, 2009 at 6:54 AM, SeanOC wrote:
>
> Hello All,
>
> During the Djangocon sprints I started to work on a patch which would
> add a nicer interface for dealing with raw SQL queries. While there I
> talked to RKM about where it should fit into the ORM API and where in
> the code base
Wishful thinking follows.
It would be awesome if one could mix ordinary QuerySet methods
with raw() (or, rather, raw_extra(), see below for that).
Assuming the following models:
class Foo(models.Model):
name = models.CharField(max_length=255)
class FooDates(models.Model):
foo = models.
> The first is that I'd like it to be compatible with deferred loading
> of model attributes - I haven't looked in to it, but my hunch is that
> this won't be too hard (it might even work in its present form without
> any further changes).
The current implementation doesn't support this. It wil
On Sep 29, 2:24 am, SeanOC wrote:
> During the Djangocon sprints I started to work on a patch which would
> add a nicer interface for dealing with raw SQL queries. While there I
> talked to RKM about where it should fit into the ORM API and where in
> the code base should live. I've finally got
On Tue, Sep 29, 2009 at 4:30 AM, Russell Keith-Magee
wrote:
...
> This trick is exactly what Django does internally when it constructs
> object instances. However, in the Django internals, it is a completely
> automated process - Django issues the query and parses the results, so
> there's no ris
On Tue, Sep 29, 2009 at 4:27 PM, David Reynolds
wrote:
>
> Russ,
>
> On 29 Sep 2009, at 03:25, Russell Keith-Magee wrote:
>
>> (1) know about the trick of instantiating an object with the
>> unrolled list version of a cursor, and
>
>
> Any chance you could expand upon this?
Sure. Assume a simpl
On Sep 29, 2:24 am, SeanOC wrote:
> During the Djangocon sprints I started to work on a patch which would
> add a nicer interface for dealing with raw SQL queries. While there I
> talked to RKM about where it should fit into the ORM API and where in
> the code base should live. I've finally got
Russ,
On 29 Sep 2009, at 03:25, Russell Keith-Magee wrote:
> (1) know about the trick of instantiating an object with the
> unrolled list version of a cursor, and
Any chance you could expand upon this?
--
David Reynolds
da...@reynoldsfamily.org.uk
--~--~-~--~~~---
> So my question, and this is something I've been thinking about a lot
> of the proposals lately is: why should this be in Django itself.
I couldn't agree with your sentiment more, in the whole. In fact, to
me, until now all of the proposals aside from Simon's seem better
outside of Django than
On Tue, Sep 29, 2009 at 9:29 AM, Alex Gaynor wrote:
>
> On Mon, Sep 28, 2009 at 9:24 PM, SeanOC wrote:
>>
>> Hello All,
>>
>> During the Djangocon sprints I started to work on a patch which would
>> add a nicer interface for dealing with raw SQL queries. While there I
>> talked to RKM about whe
On Mon, Sep 28, 2009 at 9:24 PM, SeanOC wrote:
>
> Hello All,
>
> During the Djangocon sprints I started to work on a patch which would
> add a nicer interface for dealing with raw SQL queries. While there I
> talked to RKM about where it should fit into the ORM API and where in
> the code base
17 matches
Mail list logo