Open dwhieb opened 8 years ago
@dwhieb : Sorry for the delay. I've asked the respective owners to take a look at it.
No worries - thanks!
Thanks, @dwhieb! These samples are great. Our bank of stored procedure samples currently includes Count.js which performs a document count with an optional filter and bulkDelete.js which deletes documents for a given query. What additional functionality did you want to add with clear.js and length.js?
Well for both sprocs I added the option to pass a key and value to filter on. And for count.js I used the collection's .filter() method, which seemed a little more straightforward since I was in fact filtering.
I'd be happy to incorporate these changes into the sprocs already in the repo if that'd be better. And in retrospect I think passing a filter object rather than two arguments would be a better way to structure the filter option.
Thanks for reaching out! I think since these are using underscore API it would make sense to keep them this way. There is a couple of issues which is not a big deal -- I'll add a few comments.
Great! I'll tackle these changes now.
@koltachev Ok I've added my revisions to the PR and addressed each of your comments (I noted the commit for each), as well as changed the way the filter parameter is structured, so that the sprocs now take a single (optional) filter object as an argument.
@mkolt Should be all set!
Just following up - any movement on this PR? Thanks!