On Mon, Oct 26, 2009 at 12:42 AM, Thomas Wanschik
<twansc...@googlemail.com> wrote:
>
>
>
> On 22 Okt., 23:52, Russell Keith-Magee <freakboy3...@gmail.com> wrote:
>> On Fri, Oct 23, 2009 at 5:09 AM, Thomas Wanschik
>>
>> <twansc...@googlemail.com> wrote:
>>
>> >> When a new QuerySet is instantiated (e.g. by calling
>> >> Model.objects.all()) it asks the backend for its Query class and then
>> >> creates an instance of that class. By default, this class is
>> >> sql.Query. Only the Oracle backend has its own Query which subclasses
>> >> sql.Query.
>>
>> > I think Waldermar wanted to say: 'Only the Oracle backend has its own
>> > Query which subclasses sql.query.BaseQuery.' instead of 'sql.Query'.
>>
>> I should point out that this is one of the specific problems Alex and
>> I are trying to address in the multi-db refactor. When we've finished,
>> returning the right query class should be as simple as implementing an
>> API on the backend.
>>
>
> Thanks for your answer Russell. But i have one question left. Should
> we make the effort and clean the app engine backend up in the way the
> oracle backend is done (using a query_class) or should we wait for the
> multi-db refactor and then clean up our code according to multi-db?
> Will it be easier to merge the backend into django then?

The current query_class will need to change slightly to support
multi-db, so anything you implement against that interface will
require some rework later on. That said, the fundamental approach
(i.e., the backend tells you what class to use for queries) will still
be there - it will just be used in a slightly different way.

If you want to write (and test) code now, my suggestion would be to
try making your code as clean as possible against the current
interface, with the expectation that there will be some rework once
multi-db lands. The corollary to this is that if you find yourself
needing to make weird and widespread engineering decisions in order to
support the query_class approach, you should stop and wait for
multi-db to land.

Yours
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to