[ANN] Queries preview on SqueakSource

Chris Muller chris at funkyobjects.org
Wed Jun 14 05:09:16 UTC 2006


I have posted an early beta of the queries functionality on SqueakSource, along with some preliminary documentation on the Swiki:

    http://minnow.cc.gatech.edu/squeak/5859

It is only lightly tested, but has been carefully constructed so I do expect most parts to work pretty well.  To load the code, just look for the individual packages dated this week and load them on top of a MagmaServerLoader (or MagmaTesterLoader, of course).

I'm real pleased with how the implementation has shaped up.  In particular, for standard queries, we have maintained complete "lazy" determination of the query result.  Only when a page is requested does calculation on the query "resume" only for the page requested.

When a query can be optimized down to one clause, sorting by the attribute of that clause is provided for "free" and #sortBy: will return the receiver instantly.  If sorting is needed on a different attribute or on a complex query that could not be reduced to one clause, then Magma is required to perform a full enumeration of the result.  In this case, a new MagmaCollection is with an index on the sort attribute and a reader on that index is returned from #sortBy:.  This occurs in the background, allowing "results as you go" and with #fractionSorted providing the progress indication.

Non-persistent object integration should be working!  Some of the ugliest code in Magma related to the old way of integrated non-persistent objects has, thankfully, been deleted.  Talk about addition by subtraction!  It has been replaced by much cleaner and easier to understand code.

Performance seems reasonably good from my initlal tests.

There is still no provision for ommitting duplicates; if an object qualifies under two clauses it will be included twice in the result set.  I appreciate any advice about this.

I have not tested #descending sorting yet.

It should work with legacy database files, I haven't tried.

====

I am leaving for an extended holiday beginning Friday evening, 6/16 to 6/26 and will be offline the entire time.  I was hoping to have this work completely finished by now, but I will have to finish the test cases and other refinements after I get back.  In the meantime, should you have time to try it out I, of course, appreciate your feedback.

Enjoy!

  Chris




More information about the Magma mailing list