[ZODB-Dev] Storing ordered elements

Tres Seaver tseaver at palladion.com
Tue Nov 2 13:38:18 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/02/2010 01:14 PM, Pedro Ferreira wrote:
> 
>> OOSets are ordered.
>>    
> 
> Yes, I know. My problem was that I wanted to order the elements by 
> timestamp, and I didn't want to wrap anything around them just to have 
> them ordered. But I think that in the end that's what I will do... or 
> just make them comparable by timestamp.

One alternative would be to store them as a tuple, (timestamp, object),
which should be super-cheap, and still allow for "normal" comparisons of
your domain objects.


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzQTIoACgkQ+gerLs4ltQ40ywCeKZ34CiZ5889xZ4QeM0nKGNYT
nKgAoM8V+9nXjY6aG+3wQrq6GhbXW4bg
=UHQx
-----END PGP SIGNATURE-----



More information about the ZODB-Dev mailing list