Again and Again with Monticellos...
---------- Forwarded Message ----------
Subject: Re: Reading multiple indices on MagmaCollections - second working code Date: Sunday 09 April 2006 23:21 From: Brent Pinkney brent.pinkney@aircom.co.za To: Magma list magma@lists.squeakfoundation.org
Hi Chris,
This mail follows on from "Re: Reading multiple indices on MagmaCollections - first working code".
I have decided to broaden the scope of this work by adding support for sorting the results.
r := LavaTestResource current people where: [ :each | (each familyName equals: 'Man') | ((each familyName equals: 'Pinkney') & (each age to: 60)) ] orderBy: [ :each | each age ascend , each familyName descend ]
I have no idea how to implement this yet! The current code does not even pass the 'order' clauses to the server yet.
I really think we should try to crack this problem as well - Magma's indices provide really powerful ordering facilities.
Cheers
Brent
-------------------------------------------------------
-------------------------------------------------------
Hi Chris,
I am just finsihing up now - watching some of the US Masters.
This mail follows on from "Re: Reading multiple indices on MagmaCollections - second working code".
Attached: Magma research-brp.10 Add MaClause >> #in: and rudimentary plumbing for order clauses.
We can now do this and it *should* in principle be able to use the indices:
(LavaTestResource current people where: [ :each | each familyName in: #('Mandela' 'Man') ] orderBy: [ :each | each age descend ]) do: [ :person | Transcript show: person age; tab; show: person fullName; cr ]
Time to sleep.
Regards
Brent
magma@lists.squeakfoundation.org