3 ms·
Not intended as criticism, but isn't it easier to just express your query in Python using filter?
by michaelmcmillan 9y ago
Not intended as criticism, but isn't it easier to just express your query in Python using filter?
- SFjulie1 9y agomaybe even more simple than reinventing a langage using lambda functions applying on path/value in a dict with an iterator (which can be consumed by filter/any/map/reduce) http://vectordict.readthedocs.io/en/latest/finding.html http://vectordict.readthedocs.io/en/latest/finding.html
- cyberlis 9y agoYes. You are right. But I wanted the way to store my queries in any major database. And I wanted natural simple queries. If I need to check my dictionary I want to use something similar to natural language. lambdas and filters are greate, but not obvious at a glance. If I want to check my dict: "Username is 'john' and age is greater than 23" I will make this query: "`username` == 'john' and `age` > 23" This query is obvious (i hope it is) for anyone from first glance