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

[Help/Feature Request?] Use the "where" query to find all elements with a key value greater than/less than a certain value #34

Open
OlexG opened this issue Aug 3, 2023 · 2 comments

Comments

@OlexG
Copy link

OlexG commented Aug 3, 2023

For instance, is something like this available/implemented? If not, are there any plans to do this?

await db.users.findMany({
  where: {
    createdAt: {
       lte: someDate,
    },
  },
})

On the side, the reason I want this is to "implement" pagination for myself. Are there any plans to get the actual pagination working?
Thanks! This library has been super super great otherwise.

@skoshx
Copy link
Owner

skoshx commented Aug 8, 2023

Hello, and good to hear that!

This is definitely something I'm planning on building, just haven't gotten around to doing it!

I want to keep the right balance between taking inspiration from the best parts of Prisma, while still keeping the codebase quite simple and extendable.

As such, which parts of the above implementation would you need for your pagination needs?

@OlexG
Copy link
Author

OlexG commented Aug 10, 2023

If we were able to at least filter by "less than" or "more than", that would be enough for my usecase

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

No branches or pull requests

2 participants