Hi!
Todd Blanchard tblanchard@mac.com wrote:
On Jan 1, 2007, at 1:23 AM, J J wrote:
From: Todd Blanchard tblanchard@mac.com
aDatabase readOneOf: User where: [:user | user login = 'jhouchin'].
-Todd Blanchard
Tools like GLORP are very nice: they save you writing SQL directly. But look at your line of code: it is SQL in message form.
You know, that is a good point. I think it would be easy to emulate the squeak collections operations though. ie
database users detect: [:ea | ea login='todd'] -> readOneOf: User where:... database users select: [] -> readManyOf:... reject:....
Basically treating each entity as a collection. That might be worth doing and should be pretty easy. Good idea.
Magma uses a similar trick in its query capabilities (in order to make seemingly iterative block-code actually generate a query with optimization and index-support). See here: http://wiki.squeak.org/squeak/5859
(search for #where: down that page)
I don't have time right now posting in this thread, let me just mention that I disagree with JJ :) regarding the arguments for using an RDB instead of an ODB. There are of course arguments in both directions - depending on context - but IMHO the lifecycle-argument is not as clear cut as described.
regards, Göran