pycassa/pycassa — pull request #132 by kylemcc (2012-03-19 19:58:03+00:00)
Title: Support custom types within a CompositeType

With the current implementation, you're unable to use a custom type within a Composite Type. The example in the commit log included here is somewhat contrived. However, a valid use case would be: CompositeType(OldPycassaDateType(), ... ).

This allows you to use a CompositeType in the following context:

>>> cf = ColumnFamily(pool, 'MyColumnFamily')
>>> cf.column_name_class = CompositeType(OldPycassaDateType(), UTF8Type())

Which enables:

>>> dt = datetime.datetime.utcnow()

>>> cf.get('key', column_start=(dt, ))
>>>cf.insert('key2', {(dt, 'test'): 'val'})