0.0
No commit activity in last 3 years
No release in over 3 years
Mongo-query compiles SQL-like where clauses into Mongo query 'documents'
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

mongo-query¶ ↑

Compiles SQL-like where clauses into query hashes acceptable for querying Mongo using the Mongo Ruby drivers and other wrappers (like MongoMapper).

This is very, very young and may not be complete, stable or work at all. Caveat emptor.

Examples¶ ↑

MongoQuery.compile("field_name = 1") 
  #=>{"field_name"=>1}

MongoQuery.compile("id > 5 AND id < 10 AND name='hayes'")
  #=>{"id"=>{"$gt"=>5,"$lt"=>10},"name"=>"hayes"}

Requires¶ ↑

  • treetop