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

fix(data-store): order skip take in orm and json #1243

Merged
merged 2 commits into from
Sep 15, 2023
Merged

Conversation

simonas-notcat
Copy link
Contributor

What issue is this PR fixing

There were 2 issues when running

await agent.dataStoreORMGetVerifiableCredentials({
  order: [{ column: 'issuanceDate', direction: 'ASC' }],
  take: 1,
  skip: 1
})
  • data-store-orm.ts was returning errors like "credential" alias was not found. Maybe you forgot to join it?
  • data-store-json.ts was sorting in a wrong direction, and slicing result before sorting

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests.
  • I did not add automated tests because _________, and I am aware that a PR without tests will likely get rejected.

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02% 🎉

Comparison is base (e8c270f) 84.89% compared to head (ec0dc2e) 84.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1243      +/-   ##
==========================================
+ Coverage   84.89%   84.92%   +0.02%     
==========================================
  Files         167      167              
  Lines       18113    18120       +7     
  Branches     2032     2036       +4     
==========================================
+ Hits        15377    15388      +11     
+ Misses       2736     2732       -4     
Files Changed Coverage Δ
packages/data-store-json/src/data-store-json.ts 92.30% <100.00%> (+0.73%) ⬆️
packages/data-store/src/data-store-orm.ts 90.39% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mirceanis mirceanis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@mirceanis mirceanis merged commit 28c1224 into next Sep 15, 2023
@mirceanis mirceanis deleted the fix/datastore-order branch September 15, 2023 15:49
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.

2 participants