Closed bendrucker closed 3 years ago
Basically no progress. The internals of all of the change propagation and query stuff is extremely complex with a bunch of methods highly coupled together.
Would love a PR no matter how small. I'm still debating whether these additions merit a full rewrite of the internals or whether we can get by hacking them on as is.
See #61.
@bendrucker How close are you on this? Can I help?
Looking at this I'm guessing you will need three comparators:
orderByKey
orderByPriority
orderByChild(child)
- generates a comparator for that specific childThe comparators are non trivial. I'm counting at least a dozen test cases for the
orderByChild
comparator. Would you be interested in a PR with implementations of these comparators?I'm thinking the comparators should take references to two Snapshots. This gives the comparators access to
key
andpriority
as required. Standard comparator return values: negative number forless than
, zero forequal
, and positive forgreater than
. Make sense?