

Sift.js: mongodb inspired array filting - crcn
https://github.com/crcn/sift.js

======
phzbOx
Can someone explain me why is it useful? I.e. why not using underscore or
whatever library provides map and filter?

~~~
crcn
Thanks for the feedback. I'll add a few use-cases / examples to the project
page.

Here are a few good examples which use sift:

\- Realtime API library: <https://github.com/crcn/guava>

\- Simple database written in node.js: <https://github.com/crcn/gumbo>. I use
this primarily in command line utilities, and other applications where mongodb
seems a bit over the top.

Underscore is certainly a better alternative in many cases, but the goal for
sift is to provide control over filtering collections with one query versus
manipulating them.

------
dpritchett
The first 90% of my current pymongo-backed project was great, I just came up
with whatever schemas I wanted and inserted the data as serialized JSON-style
objects.

The second 90% has been not so great... I spend my time either doing in-place
serialized batch updates to correct my own early schema mistakes or (mostly)
reinventing SQL so that I can join my schemas arbitrarily and dump them to CSV
per user requests.

I hope this means I'm just doing it wrong. Time to dig my Mongo book back out.

~~~
Pewpewarrows
Nope, unfortunately that's what I'm running into as well. A blissful start of
the project with no schemas to tie it down or hold it back. Now that it's
starting to require migrations, join-like behavior, and complicated queries, I
really just wish I had my trusty old PostgreSQL back. I swear, if I have to
write one more set of map/reduce functions just to do anything non-trivial
with this database I'm going to end up hurting a small animal.

~~~
fdr
If you could imagine designing Postgres to be more enjoyable and productive to
use in the earlier stages, what would you want?

