Friday, January 10, 2014

[Rails] Expose complex dynamic queries over REST

I'm trying to build a web application for data analysis. The client can send ad-hoc queries to my back-end data service. For example:

(foo >= 10 OR bar == 'baz') AND bat < 10

Is there a rails/activerecord standard for sending this type of query through REST? A DAO / method_missing won't work because there are an infinite number of permutations per model (e.g. an arbitrary number of attributes, clauses, etc). Is there something that could take a "Lucene-like" query string and construct an activerecord request? Or do I just have to manually parse it myself?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/00cdefd6-11f3-411f-b0b4-67e0c51e2eea%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate