Send all params to request object #662

Closed
daleharvey opened this Issue Apr 2, 2013 · 5 comments

Projects

None yet

4 participants

@daleharvey
Member

instead of just the stuff inside query_params


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@neojski
Member
neojski commented Apr 8, 2013

Would you elaborate on this bug?

@benrudolph
Contributor

I believe we are supposed to pass the entire request object back to the filter function in the changes api. Here is the line for the local adapters:

https://github.com/daleharvey/pouchdb/blob/master/src/pouch.utils.js#L216

It shouldn't be a tough change. I have a small bit of code and tests for it if you'd like to have a look at it or use it.

@daleharvey
Member

yup, so we do

db.changes({limit: 10, custom: 'option'}, 

instead of

db.changes({limit: 10, query_params: { custom: 'option'}}, 
@qs44
Contributor
qs44 commented Feb 9, 2014

I can take a look at this one.

If I am understanding correctly, we want to modify the line
req.query = opts.query_params
to include more than just those query_params?

@daleharvey
Member

Sorry thought I had replied to this, yeh it would mostly be replacing with

req.query = opts;

looking at the couchdb docs which do use a seperate option (https://wiki.apache.org/couchdb/Replication) I think this should be closed invalid, sorry, I originally thought the extra query_params was a bit ugly, but I think it being explicit and not overloading opts is much more important

@daleharvey daleharvey closed this Feb 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment