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

feat: Add "count" to CLP initial value #5841

Merged

Conversation

douglasmuraoka
Copy link
Contributor

In order to #1165 work properly, it is needed to include "count" to the initial CLP when a class is created.

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #5841 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5841      +/-   ##
==========================================
- Coverage   93.72%   93.71%   -0.01%     
==========================================
  Files         148      148              
  Lines       10304    10304              
==========================================
- Hits         9657     9656       -1     
- Misses        647      648       +1
Impacted Files Coverage Δ
...dapters/Storage/Postgres/PostgresStorageAdapter.js 96.9% <ø> (ø) ⬆️
...rc/Adapters/Storage/Mongo/MongoSchemaCollection.js 97.67% <ø> (ø) ⬆️
src/LiveQuery/ParseWebSocketServer.js 85.71% <0%> (-9.53%) ⬇️
src/RestWrite.js 93.51% <0%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b605638...09912c6. Read the comment docs.

@dplewis dplewis merged commit 4fe0ff6 into parse-community:master Jul 24, 2019
@dplewis
Copy link
Member

dplewis commented Jul 24, 2019

Nice work! Can't wait to see it in the dashboard.

@JeromeDeLeon
Copy link
Contributor

I'm using the latest version and I'm getting an error saying "Permission denied.." on withCount and I'm pretty sure this has something to do with this change.

@davimacedo
Copy link
Member

can you share your schema CLP qnd the query that you are using to count?

@JeromeDeLeon
Copy link
Contributor

I already found it. the reason is that migrating from old version to new version of parse server causes that permission to be denied. I had to update the parse dashboard and manually applying count permission to classes. I don't really get the idea of putting count into permission.

@davimacedo
Copy link
Member

It already exists for a long time but there was a bug causing it to not work properly.

@JeromeDeLeon
Copy link
Contributor

also find and get. I don't quite understand the docs, whats the difference?

@davimacedo
Copy link
Member

// You need find access to:
await (new Parse.Query('SomeClass')).find();

// You need get access to:
await (new Parse.Query('SomeClass')).get(someObjectId);
// or
await someParseObject.fetch();

You need count access to:
await (new Parse.Query('SomeClass')).count();

UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* feat: count CLP default values

* fix tests
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

Successfully merging this pull request may close these issues.

4 participants