-
Notifications
You must be signed in to change notification settings - Fork 0
Offset
Christoph Herrmann edited this page Oct 17, 2019
·
3 revisions
const offset = 20
const result = await sql.query(sql`
SELECT * FROM users LIMIT 5 ${sql.offset(offset)}
`)
// text: SELECT * FROM users LIMIT 5 OFFSET 20
// values: []The offset is dedicated validated and set into the text without parameter placeholder, because a placeholder don't care about the number is negative or positive and a negative number for the offset would result in a SQL error.
Found a bug or missing a feature? -> Create a new Issue
Found a security issue? -> Look at the Security Policy
Having questions, want to give feedback or talk to me? -> E-Mail me sql-pg@sharaal.de