[elephant-devel] Best way of getting a collection size
Ian Eslick
eslick at csail.mit.edu
Tue Oct 2 16:00:22 UTC 2007
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 at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list