[Seaside] GOODS best practice data storage
avi at beta4.com
Fri May 21 21:20:19 CEST 2004
On May 21, 2004, at 12:12 PM, Sebastián Sastre wrote:
> Avi, I'm curious about DoubleLinkedList, where do you find one in ST?
I believe Ken Causey wrote one, but I don't think it's available
> Anyway, as you say the results of TreeSets and BTrees are promising but
> I'm not sure about how to use them. I mean when instantiation a TreeSet
> is does not allow to add any object. I've modified sightly and then it
> worked. Here is the modified code:
> TreeSet>>bucket: anArray includes: anObject
> ^ (anArray detect: [:ea | (self value: anObject matches: ea)]
> ifNone:[#()]) notEmpty.
That's not right either - I would think it should be:
^ anArray anySatisfy: [:ea | (self value: anObject matches: ea)]
I'm confused as to how it got the way it was, since as you say it
doesn't work at all with the current code.
> Actually the migration script I'm using now is like this (I take out
> some time and percentage vars):
> db root: Dictionary new;commit.
> db root at:#items put: TreeSet new.
> db commit.
> 1 to: items size do:[:i |
> (db root at:#items) add: (items at:i).
> (i/10) isInteger ifTrue:[ db commit ] ].
> Do you think this code should behave as the graph of TreeSets and
No, because you're not sending #flushAll after you commit. That should
flatten the graph.
More information about the Seaside