Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent does not set totalCount #41

Closed
kitsonk opened this issue Oct 15, 2012 · 1 comment
Closed

Persistent does not set totalCount #41

kitsonk opened this issue Oct 15, 2012 · 1 comment

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Oct 15, 2012

While likely related to #40, this is a separate issue in that Persistent (and I assume Memory and ReadOnly) do not set the results.totalCount. It always returns as undefined.

For example, the following code, you would expect totalCount to be set:

var store = require("perstore/stores").DefaultStore({
  path: "data",
  filename: "example.json"
});

var results = store.query("limit(1,0)", {});

console.log(results.totalCount);
kriszyp added a commit to kriszyp/perstore that referenced this issue Nov 25, 2013
@kriszyp
Copy link
Member

kriszyp commented Nov 25, 2013

The totalCount is only computed if the third argument is supplied:
limit(0,10,Infinity)

@kriszyp kriszyp closed this as completed Nov 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants