As Brent mentions, have a look at the server-side processing of where:. You may be able to generalize it to do this, but it will require some research and work as there is some complexity to the MagmaCollection's.
MaQueryExecutor is a good place to start, but note a modern Omni browser or the Tracing Messages Browser will suit you well to researching this code as there are several layers.
Couldn't what you need be accomplished "manually?"
- Chris
On 10/1/07, Burella Juan M. juan.burella@gmail.com wrote:
Hi Chris. I need to do something like this:
{ aMagmaCollection1 . aMagmaCollection2 } where: [: readers | (readers first read: #name at: 'John Player') | (readers second read: #name at: 'Terry McKenzie') ].
or if you prefer using the Smalltalk Collection protocol from this example:
#(1 15 3 10 ) with: #(5 6 7 8) collect: [:i : j | (i max: j) ]
and then we could write
aMagmaCollection1 with: aMagmaCollection2 where: [: reader1 : reader2 | (reader1 read: #name at: 'John Player') | (reader2 read: #name at: 'John Player')
but this one would be limited to allow only two magma collections. We haven't found yet a simple way to do it and will be very glad if you could suggest how you would face the solution.
I suppose this can be done this way:
(readers first read: #name at: 'John Player') union: (readers second read: #name at: 'Terry McKenzie')
but I think #where: is somewhat optimized (?).
I'm using the latest Magma. Best regards. Juan M.
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma