Currently none of the stores support comparing lists. I think we could add this to the BDB backend, but it would require a change in the way that lists are serialized that wouldn't be backwards compatible. Even if we did it for BDB, I don't think we can do it for the postmodern or CL-SQL stores.

Unfortunately strings are the only unbounded data item that can be correctly compared by all stores. Consequently, they are the only way to store lists in indexed slots and get the expected behavior.

Think of this re-encoding as a means to generate a signature for a class of objects that is guaranteed to have the same total order as the original objects under lisp 'equal.

Sometimes the elegance of the hack depends on how you look at it.  :)

Ian

On Sep 26, 2008, at 4:26 PM, Frank Schorr wrote:

(using ele version 0.9 on lispworks/win32)

I'm storing a list in an indexed slot of a persistent object. Retrieving the object with get-instance-by-value, where value is #'equal to the stored list, does not seem to work.

One could print the list to a string and use the string for indexing, but I believe there
is a better "design pattern".

How do you store (nested) lists in indexed slots ?


Thank you for your help.

Frank

_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/? mc=022220

_______________________________________________
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