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

Implement sort-by for data contracts and identities #121

Merged
merged 22 commits into from
May 1, 2024
Merged

Conversation

pshenmic
Copy link
Owner

@pshenmic pshenmic commented Apr 29, 2024

Issue

Issue #107 adds some sorted lists of data contracts and identities by tx amount and balance. To implement that, backend API should allow sorting by different keys.

This PR introduces a way to specify sort key for getDataContracts() and getIdentities() in the API calls.

Things done

  • Implemented sorting by block height and documents count for /dataContracts route path
  • Implemented sorting by block height, tx count and balance for /identities route path
  • Added integration tests for implemented sort_by features
  • Added SQL index on transfers.recipient and transfers.sender
  • Added SQL index on blocks.timestamp

@pshenmic pshenmic self-assigned this Apr 29, 2024
Copy link

vercel bot commented Apr 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
platform-explorer-zham ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2024 5:19pm

@pshenmic pshenmic added the backend Related to backend (API) label Apr 29, 2024
@pshenmic pshenmic changed the title Implement sort-by in the data contracts Implement sort-by for data contracts and identities May 1, 2024
@pshenmic pshenmic merged commit ca672c8 into master May 1, 2024
6 checks passed
@pshenmic pshenmic deleted the feat/sort-by branch May 1, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend (API)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant