-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSL for Parse::Query#in_query #57
Comments
I haven't had a need for |
Maybe I'll save that nice syntax for the parse_resource-ruby-client-epic-merge. |
We should do a parse_resource-ruby-client-epic-merge hackathon. |
it's nice to get rid of the new'ing of queries everywhere, but you have to def class_name_for_column(column) def column_name_for_class(clazz) On Fri, Jan 11, 2013 at 11:54 AM, Jamon Holmgren
|
That does look pretty useful. Also, perhaps a simpler implementation is to not use blocks, and instead to have post_tags = Parse::Query.new("PostTag").tap do |q|
q.in_query("tag").tap |tag_query|
tag_query.eq("category", "Person")
end
end.get |
@jamonholmgren heh, maybe a (mandatory) Clearsight Studio employee hackathon. I'll just kick back and accept the pull requests. |
@adelevie there you go, open source administration at its best. |
Here's the current usage:
Assume I have the classes
Post
,Tags
, andPostTags
(which joins the first two).def in_query(field, query)
query_hash = {Parse::Protocol::KEY_CLASS_NAME => query.class_name, "where" => query.where}
add_constraint(field, "$inQuery" => query_hash)
self
end
And here's what I propose:
Is this something anyone (@ericcj, @jamonholmgren) would want?
The text was updated successfully, but these errors were encountered: