Seifer
Pagination
Hi everyone, I have a question. I'm working with a database in mssql and I'm creating a function to paginate the data in a table. For this I was doing something like the following: const person = await db
.selectFrom('person')
.selectAll()
.where('id', '=', '1')
.offset(0)
.limit(10)
.execute(), but I realized that in mssql you can't use the expression "LIMIT" but you have to use "FETCH NEXT", so my question is this: doesn't Kysely translate the queries depending on the dialect being used? if this is the case, shouldn't the limit() function be translated to "FETCH NEXT", if you're using a dialect where "LIMIT" is not supported?
7 replies