[elephant-devel] Documentation Updates

Ian Eslick eslick at media.mit.edu
Fri Jun 20 18:42:38 UTC 2008


Great stuff!

To answer a couple of questions:
- Cached slots aren't ready yet; I'll document when I can work out the  
kinks:
- Indexed slots are the same as the existing indexed-slots  
descriptions, except for
   the :inherit slot option so you should be able to copy & paste  
existing content
   for these slots and for derived index slots
- Derived index slots are still pertinent and will remain

-----------------------
Set-valued Slots

src/elephant/set-valued-slots.lisp

Set-valued slots are a convenient shorthand to using PSETs as slot  
values to get persistent collections as slot values.

(slot-value object 'set-slot)
returns a SLOT-SET which implements the PSET interface as well as:
	map-slot-set - maps over the elements of the set
	drop-slot-set - drops the set from the DB
	slot-set-list - returns a list of the elements in the set

(setf (slot-value object 'slotname) foo)
adds foo to the SLOT-SET in slot named 'slotname
however, if foo is a slot-set object, it drops and replaces the  
existing slot-set

(slot-makunbound object 'slotname)
Make the slot unbound and drops the SLOT-SET from the DB.

Of course these work for accessors too (setf (accessor object) foo) =>  
adds foo to slot set

There are a couple of helper macros to simplify expressions like:
	(slot-set-list (slot-value object 'set-slot))

(set-list object 'slotname)
(set-insert foo object 'slotname)
(set-remove foo object 'slotname)

I'm happy to rename these operators if anyone has opinions on better  
names...

Regards,
Ian


On Jun 20, 2008, at 11:17 AM, Glenn Tarcea wrote:

> Attached are updates to the documentation. Specifically I updated:
>
> 1. Section: Setting Up Berkeley DB - to include the additional flags  
> (:berkeley-db-max-locks and :berkeley-db-max-objects) along with  
> their descriptions and updated the list of of parameters in the my- 
> config.sexp
>
> 2. Added a new section under Installation titled "Using Multiple  
> Versions Of Elephant" that describes how to use ASDF to allow  
> multiple versions of Elephant to be installed on a single system
>
> 3. Made a change to one of the Scenarios where the class was system- 
> object, but the methods were referring to system-state (Section:  
> Persistent System Objects)
>
> 4. Put placeholders in for the different slot types, titled:
>     Using Cached Slots
>     Using Indexed Slots
>     Using Derived Indexed Slots
>     Using Set Valued Slots
>
> 5. Added a write up based on Ian's email on Association Slots titled  
> "Using Association Slots"
>
> 6.  Updated the Section (4) titled "Berkeley DB Data Store":
>    a. to include references to the new my-config.sexp parameters
>    b. Updated the open-store parameters to include :max- 
> locks :cachesize and :max-objects
>    c. Updated performance tuning to quickly describe what berkeley- 
> db-max-locks, and objects do
>    d. Show an example call to open-store using :max-locks and :max- 
> objects
>    e. Updated performance tuning to include a reference to the  
> Berkeley-DB parameters that max-locks and max-objects refer to and  
> to point the user at DB_CONFIG for additional information.
>
> Can someone send me a quick example or jot down a few notes on using  
> Cached and Set Valued slots?
>
> Are Derived Indexed Slots still pertinent (I recall a lot of  
> discussion regarding them but don't recall what the outcome was).
>
> More documentation updates later.
>
> Thanks,
>
> Glenn
>
> <doc-patch-1.patch>_______________________________________________
> 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