Support for LEX's request chaining
Feature request for nested LEX's requests like gun.get('position').get({'.': {'>': '25', '<': '50'}})).get({'.': {'>': '10', '<': '20'}).
It would offer new opportunities like a base for rough geo-queries.
It could be split it in different step like:
- [ ] Filtering on the current machine
- [ ] Filtering on the peers
Supposed limitations:
- All limitations from the first LEX's query of the chain
Possible issues:
- Would be harder to be sure that all documents are got
Current state:
- It just returns blank, and nowhere the documentation shows that it is allowed to make such chains
hey thanks for idea!
recently @amark said to focus the usage of lex using .map()
try using map() instead of get() and post back results for that, cheers
Hey,
I don't get better luck with map: https://jsfiddle.net/Buom01/x0hf6gu5/14/
LEX is being significantly being improved in [a far forward] future version - turns out we only need 1 parameter, not 3.
I think I can approximately make it compatible (since LEX is currently buggy anyways) by choosing > by default, and < for reverse queries (-).
Afterwards, pretty much all GUN queries will be a type of LEX query. Which should make chaining easier too. But fixing the current version is low priority, just heads up.