On Sat, 2008-10-04 at 23:49 -0700, Rock wrote:
> 
> > In any case, you can already do what you want using custom managers. You
> > return a custom queryset that generates the query however you like.
> > Lifting all that up into Meta doesn't seem necessary to me.
> >
> 
> Good feedback Malcolm, but I don't understand that last statement. In
> the case of partitioned tables for selected models, the model/manager
> interaction with the database is unchanged from normal use accept that
> there are some optimized options for batch deletion that a manger
> class can add. However the main thing that is different in this
> particular case is the creation of the tables and the creation of the
> indexes. I was not aware that I could handle that with a custom
> manager. (The way that I made this work was by creating a custom
> version of the sqlreset manage.py command.)
> 
> So how do I customize the table creation using the model manager?

Aah, creation. Good point. You can't do that with a custom manager right
now. That's something we'll have to solve with the multi-db stuff.

I don't think it necessarily belongs in Meta, though, at least not as a
pluggable storage engine type of thing. The reason is that I'm actually
trying to move as much of the dependency on the fact that there's a
relational database underneath away from the model-layer as possible.
And "creation" is *very* specific to the type of backend. So once we
have support for something like a Google App Engine storage backend or
an LDAP storage backend or whatever, we still want to push that stuff
into the storage layer, not have it in the models.

We certainly have to think about a solution there, but I don't think
this is it right now. It seems to tie things to being SQL related. And,
yes, I'm aware you can specify stuff like db-table in there now. That's
not a reason to add yet more stuff. We need to come up with a general
solution there, not more and more attributes.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to