canjs / can-query-logic

Perform data queries and compare queries against each other. Provides logic useful for data caching and real-time behavior.

Home Page:https://canjs.com/doc/can-query-logic.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add docs for $or

chasenlehara opened this issue · comments

It looks like $or works great in filter: https://codepen.io/bitovi/pen/NQNWbj?editors=0012

todoQueryLogic.filterMembers({
    filter: {
        $or: [{
          id: 1
        }, {
          complete: true
        }]
    },
    sort: "-name",
    page: {start: 0, end: 19}
}, [
    {id: 1, name: "do dishes", complete: false},
    {id: 2, name: "mow lawn", complete: true},
    // ...
]);

I couldn’t find docs for $or anywhere in the can-query-logic docs.

This was asked on Slack: https://bitovi-community.slack.com/archives/CFC22NZ8A/p1560787507109300