`Json` ordering
Open
Nobody has claimed this yet.
kind/feature
topic: Json
topic: orderBy / sorting
- Dominant language
- TypeScript
- Stars
- 47.6k
- Forks
- 2.5k
- Avg merge
- 21h 59m
- Merged PRs (30d)
- 95
Description
Problem
The "json ordering" feature is required. This is, in my opinion, a fairly basic feature. People who are introduced to prisma for the first time will discover that this function does not exist and will be perplexed, as I was.
Suggested solution
const getUsers = await prisma.user.findMany({
orderBy: {
extendedPetsData: {
path: ['pet2', 'petName'],
direction: 'asc',
},
},
})
Alternatives
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named in the issue. Start by examining the requested orderBy example and the project's database query paths; done means JSON fields can be ordered by a nested path in ascending or descending order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100