[elephant-devel] Re: Derived Indicies
Alex Mizrahi
killerstorm at newmail.ru
Thu May 8 17:00:05 UTC 2008
IE> (defpclass user ()
IE> ((name :accessor name)
IE> (index :accessor index :associate (message user))))
IE> (setf charlie (make-instance 'user))
IE> (defpclass message ()
IE> ((user :accessor user :associate user)))
IE> (make-instance 'message charlie)
IE> (make-instance 'message charlie)
IE> (inbox charlie) => returns two messages with charlie in the user slot
...
IE> The derived index hack is still more efficient for large sets.
IE> Without changes to the data stores to create an efficient way of
IE> sorting concatenated values, I don't see a way to improve on it easily.
but if we'll add that tuple sorting, will it be possible to make a nice
front-end interface to it?
maybe something like:
(defpclass user ()
((name :accessor name)
(inbox :accessor index :associate (message user) :sort-by
'creation-time))
(get-by-range user 'inbox yesterday nil)
?
More information about the elephant-devel
mailing list