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

Sort records by updated date (desc) #842

Closed
bastienbeurier opened this issue Jul 26, 2023 · 0 comments · Fixed by #872
Closed

Sort records by updated date (desc) #842

bastienbeurier opened this issue Jul 26, 2023 · 0 comments · Fixed by #872
Assignees
Labels
enhancement New feature or request

Comments

@bastienbeurier
Copy link
Member

bastienbeurier commented Jul 26, 2023

From the community:

Hi folks,
Question: after sync, how are data entries indexed and sorted? For example Linear issues, we have model:
LinearIssues:
id: string
title: string
description: string
creator: string
assignee: string
createdAt: string
updatedAt: string
state: string
Testing with getRecords API, I found that the returned records are sorted by id, which means unsorted by updateAt and createdAt , defeating the point of pagination of the getRecords .
So how are the records indexed in Nango cloud storage? It is just looking for a field named id to index, or looking for the very first field, or some other strategies? How can we retrieve the records sorted by updatedAt?

Should apply by default to both the SDKs & REST API!

@bastienbeurier bastienbeurier added the enhancement New feature or request label Jul 26, 2023
khaliqgant added a commit that referenced this issue Aug 3, 2023
khaliqgant added a commit that referenced this issue Aug 4, 2023
khaliqgant added a commit that referenced this issue Aug 4, 2023
khaliqgant added a commit that referenced this issue Aug 4, 2023
* [gh-#842] add sortBy and order

* [gh-#842] default desc

* [gh-#842] no need for toLowerCase

* [gh-#842] lower case in the data records call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants