jquery-indexeddb icon indicating copy to clipboard operation
jquery-indexeddb copied to clipboard

Count method on index - argument are ignored

Open whodies opened this issue 11 years ago • 6 comments

Seems that the index count method automatically submit an empty array of argument rather than the arguments I give it - Line 501 :

"count": function() { return indexOp("count", indexName , []); },

whodies avatar Oct 27 '13 11:10 whodies

Solved it for me by adding the needed arguments at line 501:

"count": function(range) { return indexOp("count", indexName , range); },

and line 278:

"count": function(range) { var range = wrap.range(range); if (typeof idbIndex.count === "function") { return wrap.request(idbIndex.count(range)); } else { throw "Count not implemented for cursors"; } }

This is a great plugin, thanks for all the hard work !

whodies avatar Oct 27 '13 12:10 whodies

Can you submit a pull request for this please ?

axemclion avatar Oct 27 '13 16:10 axemclion

Im new here, dont know what a pull request is

whodies avatar Oct 27 '13 16:10 whodies

This bug nearly made me throw my machine out of the window (especially: this is not fucking documented ANYWHERE)! Let me write up a PR.

msmuenchen avatar Oct 31 '13 18:10 msmuenchen

@axemclion see #57 .

@whodies next time, just fork the repository, clone your forked repository, commit and push your fix. Then create a pull request by going on your forked repo and clicking "create pull request".

msmuenchen avatar Oct 31 '13 18:10 msmuenchen

All this stuff is chinese to me. I should read up on what forking and cloning means. Appreciate your help though !

whodies avatar Oct 31 '13 18:10 whodies