[Nitro] Ruby as an Og query language

George Moschovitis george.moschovitis at gmail.com
Thu Feb 2 09:03:02 EST 2006


Dear devs,

I added some experimental support for Caboose/EZ in the repo version of Og.
This allows you to use Ruby as the query language for Og. Here is an
example:

user = User.ez_find { |user|
  user.age > 10
  user.any {
    name == 'George'
    name == 'Stella'
  }
}

# => SELECT * FROM oguser WHERE (oguser.age > 10 AND (oguser.name =
'George' OR oguser.name = 'Stella'))

Eventually this will be a standard option for find (I dont like ez_find).

This is still early code and I will work with Ezra (the original
author of EZ) to better integrate this with Og. I would like to hear
your additional suggestions. For example I would like a suggestion for
naming this feature. I plan to use 'natural' as in 'Og natural
querying'.

regards,
George.


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list