Malcolm,

I strongly concur with the proposed API. It looks like it can be used
to implement future RangeHash partitioning support. Consider:

I have a model to be partitioned that has an IntegerField that will
become the range partitioning value:

week = models.IntegerField() # 1 to 53 depending on the week of
creation

The hash partitioning value is a field that works precisely like "id":

hash_id = models.IntegerField( auto_everything=True ) # (I made
"auto_everything" up as I am not sure precisely what parameters I need
to set in order to make this happen.)

Now I can create my RangeHash partitioning primary key with a
compositeField:

range_hash = models.CompositeField( hash_id, week, primary_key=True )


What I am doing today for my partitioned models is to use the
automatically generated "id" field, but that looks dicey with the
CompositeField since you can't do this:

range_hash = models.CompositeField( id, week, primaryKey=True )

since "id" doesn't exist yet and, by designating this CompositeField
as the primary key, id won't be generated. Rather than try to special
case this situation, ensuring that I can create a field that works
precisely like "id" by hand and then using that seems to be the way to
go.

Rock


--~--~---------~--~----~------------~-------~--~----~
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