Closed sombriks closed 3 weeks ago
This is happening to me, in previous version 0.32.0 the limit value worked fine, now even with numbers it does not limit the query
You shouldn't be passing strings to limit nor offset. The input type for those are number | Placeholder
.
What version of
drizzle-orm
are you using?0.33.0
What version of
drizzle-kit
are you using?-
Describe the Bug
sometimes values for limit and offset came as string from requests, although they are perfectly valid numbers.
this doesn't seem to be an issue for offset, but for limit it causes lots of trouble.
it should not.
drizzle should be smart enough to figure the numbers, no matter the database engine.
for instance, for sqlite it throws an error, for postgres it simply ignores the limit/offset, returning all possible results.
Expected behavior
expect limit/offset to be honored
Environment & setup
see this gist for a sample https://gist.github.com/sombriks/a071d873a215b23f5532deee4622fe4e