payload icon indicating copy to clipboard operation
payload copied to clipboard

feat(db-postgres): Add multiple field sort by string

Open SimYunSup opened this issue 9 months ago • 4 comments

Description

Related disscusion is #2089. For 1.x PR, #3236.

I added conditional logic for multiple field sort. sort string is implemented as comma format like PR comment.

https://github.com/payloadcms/payload/blob/45b3f06e1b239623a8be5f73e0324aabccf244d6/packages/db-postgres/src/queries/buildQuery.ts#L98-L100

I wasn't sure what this code was doing, so I opened the PR as a draft.

  • [x] I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • [x] New feature (non-breaking change which adds functionality)

Checklist:

  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] Existing test suite passes locally with my changes
  • [ ] I have made corresponding changes to the documentation

SimYunSup avatar Apr 30 '24 04:04 SimYunSup

Progress: Fix adding version. to sortPath when queryDraft has sort.

When payload v3 is released, I hope it will be fixed and merged with the reason why selectFields.sort was used. :)

SimYunSup avatar May 22 '24 08:05 SimYunSup

any chance to get this updated/merged?

max-degterev avatar Sep 12 '24 22:09 max-degterev