I'm not sure offhand. Different stores will have different low-level access to the data structure. Robert might be able to do this via a SQL query. Not sure about Henrik's Postmodern implementation.

This probably isn't possible for the BDB data store. You can get the leaf count for a BDB Btree, but not for a subtree (we multiplex Elephant BTrees on a single, large BDB BTree).

Perhaps we could provide a mixin class that automatically maintains this count on the lisp side for a user subclass of persistent- collection?

Ian


On Oct 2, 2007, at 10:34 AM, Mariano Montone wrote:

Hello,
I would like to know which is the best way to get the size of a persistent-collection (for example the number of instances of some class). I haven't be able to find a method. And uploading all the objects to memory to count them is not an option.

Cheers, Mariano
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to