Brent and I are pleased to announce completion of complex-query functionality for MagmaCollections. Magma users can now simultaneously enjoy the transparency of an object database with high-performance multi-attribute querying similar to relational databases.
For specific information:
http://minnow.cc.gatech.edu/squeak/5859
For general information about Magma:
http://minnow.cc.gatech.edu/squeak/2665
This functionality is now part of the one-click "Loader" install.
If anyone has any questions please feel free to ask.
Cheers, Chris
Hi Chris!
Not sure what happened in the latest cmm.19 release but this code:
myReader := myMagmaCollection read: #lastName from: 'Jackson' to: 'Muller'
...does not work anymore since read:from:to: is not implemented any longer on MagmaCollection. If this has changed and we need to get a reader in some other way now then you need to update this swiki page:
http://minnow.cc.gatech.edu/squeak/2639
Or did the refactoring axe slip? :)
regards, Göran
Hi!
goran@krampe.se wrote:
Hi Chris!
Not sure what happened in the latest cmm.19 release but this code:
myReader := myMagmaCollection read: #lastName from: 'Jackson' to: 'Muller'
...does not work anymore since read:from:to: is not implemented any
I presume the above should now be done using:
myReader := aMagmaCollection where: [ :reader | reader read: #lastName from: 'Jackson' to: 'Muller' ]
regards, Göran
Hi Göran,
Contratulations of your Seaside + Magma application.
As for the new complex queries, it is preferable to use a more sematically meaningful formal argument in the #where: block.
viz: friends := self people where: [ :person | person lastName between: 'Jackson' and: 'Muller' ].
instead of:
myReader := aMagmaCollection where: [ :reader | reader read: #lastName from: 'Jackson' to: 'Muller' ].
Magma uses all sorts of posh Smalltall techniques to make this level of readability, and hopefully elegance, possible.
Of couse, the purpose of this work is to make complex queries possible:
oldies := self people where: [ :person | ( (person lastName between: 'Jackson' and: 'Smith') && (person age > 30) ) || (person lastName = 'Pinkney') ] distinct: true sortedBy: #age descending: true.
oldies do: [ :oldie | oldie doSomething ].
We hope you like this.
Brent
Hi Brent!
Brent Pinkney brent.pinkney@aircom.co.za wrote:
Hi Göran,
Contratulations of your Seaside + Magma application.
Thanks!
As for the new complex queries, it is preferable to use a more sematically meaningful formal argument in the #where: block.
viz: friends := self people where: [ :person | person lastName between: 'Jackson' and: 'Muller' ].
instead of:
myReader := aMagmaCollection where: [ :reader | reader read: #lastName from: 'Jackson' to: 'Muller' ].
Magma uses all sorts of posh Smalltall techniques to make this level of readability, and hopefully elegance, possible.
Yeah, I know how it works - I just wanted to be a bit low level. Earlier MagmaCollection implemented the read:from:to: message but now I need to go through the where: entry - which makes it a bit contrived.
regards, Göran
I tried loading the latest into my preloaded image of yesterday and now the system will not save its image. I guess there is some #initializing needed. I am not very good at tracking these things down.
Keith
___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
Hi!
keith hodges keith.hodges@warwick.ac.uk wrote:
I tried loading the latest into my preloaded image of yesterday and now the system will not save its image. I guess there is some #initializing needed. I am not very good at tracking these things down.
I saw some such things too - but now I can't recall exactly. What is the symptom? IIRC I think I had some repository controller dangling about so I cleared those by hand but you can probably do:
MagmaRepositoryController allInstances do: [:c | c close]
...and ignore any error and repeat it until there are none left. :)
Or do as I did, browser MagmaRepositoryController class>>initialize, select this code in the browser: "OpenControllers := Set new" and press alt-d to do it.
As I said, my memory doesn't server me well, but perhaps this helps.
regards, Göran
magma@lists.squeakfoundation.org