derbyjs/racer — pull request #202 by ile (2014-11-09 09:51:22+00:00)
Title: query api change

Adding a new query feature:

Old way
```coffeescript
usersQuery = model.query 'users', '_page.userIds'
```
New:
```coffeescript
usersQuery = model.query 'users', { id: '_page.userIds' }
```

This new way would allow ordering/filtering the data set on the server. For the moment the filter/sort is a bit broken on the client (there is a delay) and this would work around that, although sort should probably be fixed too.

I suppose this would be a bit more efficient and (arguably) would make the api a bit more unified too. IMO, this would be a little more clean than `'users', '_page.userIds'` way.

So this should allow queries like:
```coffeescript
usersQuery = model.query 'users', { id: '_page.userIds', "$orderby": { created_at : -1 } }
```