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

Record count #415

Merged
merged 1 commit into from
Feb 20, 2022
Merged

Record count #415

merged 1 commit into from
Feb 20, 2022

Conversation

groenroos
Copy link
Member

Instead of returning just the dry array of data from Storage methods, return an object that contains data and a count for the total count of records returned. This opens up opportunities for further metadata to be included later.

Still a bit woolly around how the delete method communicates data-less success, but this can be improved later.

The MongoDB driver will have to change a little bit too to accommodate these adjustments.

Closes #171.

@groenroos groenroos added the feature Brand new features to Sapling label Feb 20, 2022
@groenroos groenroos added this to the M2 - Release 2.0 milestone Feb 20, 2022
@groenroos groenroos self-assigned this Feb 20, 2022
@codecov
Copy link

codecov bot commented Feb 20, 2022

Codecov Report

Merging #415 (f211a50) into master (6ceef8e) will decrease coverage by 0.14%.
The diff coverage is 88.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #415      +/-   ##
==========================================
- Coverage   98.18%   98.04%   -0.15%     
==========================================
  Files          37       37              
  Lines        4517     4547      +30     
==========================================
+ Hits         4435     4458      +23     
- Misses         82       89       +7     
Impacted Files Coverage Δ
lib/Storage.js 89.81% <84.78%> (-0.76%) ⬇️
core/loadCustomTags.js 100.00% <100.00%> (ø)
drivers/db/Memory.js 99.11% <100.00%> (+0.01%) ⬆️
hooks/sapling/user/recover.js 100.00% <100.00%> (ø)
hooks/sapling/user/register.js 98.09% <100.00%> (ø)
hooks/sapling/user/update.js 100.00% <100.00%> (ø)
lib/Response.js 98.46% <100.00%> (-0.05%) ⬇️

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 6ceef8e...f211a50. Read the comment docs.

@groenroos groenroos merged commit 51f461d into master Feb 20, 2022
@groenroos groenroos deleted the feature/record-count branch February 20, 2022 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new features to Sapling
Development

Successfully merging this pull request may close these issues.

Get record count
1 participant