You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
get players where jobs in ["bass", "drum"]
# would return Neil Peart and Geddy Lee
Considrations
Should be insensitive to the key types, should work on atom and string maps and even mixed up in the nesting (not mixed in the same map but mixed nested, example: %{name: "Neil Peart", "jobs" => []} wouldn't be accepted, but %{band: "Rush", members: [%{"name" => "Neil Peart"}]} would)
Variants should not be hardcoded and user implemented instead. So someone can have get players where name:insensitive = "geddy lee".
Paths should be used for keys that cannot be identifier (keys with space, for instance), like: get players where country["city name"] for a map that looks like %{"country" => %{"city name" => city}}.
The returned value of the impletation should probably by a lambda function that accepts a map or call it directly, to be determined. But it would be best to avoid crawling the whole map so maybe giving out another kind of structure that can directly use get_in on the map.
The text was updated successfully, but these errors were encountered:
Provide an implementation that allows crawling a Map using the predicates. Example:
And use query like
Considrations
%{name: "Neil Peart", "jobs" => []}
wouldn't be accepted, but%{band: "Rush", members: [%{"name" => "Neil Peart"}]}
would)get players where name:insensitive = "geddy lee"
.get players where country["city name"]
for a map that looks like%{"country" => %{"city name" => city}}
.get_in
on the map.The text was updated successfully, but these errors were encountered: