axemclion / jquery-indexeddb

An IndexedDB Plugin for Jquery.
Other
195 stars 71 forks source link

Count method on index - argument are ignored #53

Open whodies opened 10 years ago

whodies commented 10 years ago

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 commented 10 years ago

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 !

axemclion commented 10 years ago

Can you submit a pull request for this please ?

whodies commented 10 years ago

Im new here, dont know what a pull request is

msmuenchen commented 10 years ago

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 commented 10 years ago

@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".

whodies commented 10 years ago

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