Back to Drizzle Orm

0.24.5

changelogs/drizzle-orm/0.24.5.md

0.45.2327 B
Original Source
  • Add possibility to have placeholders in .limit() and .offset()
ts
const stmt = db
  .select({
    id: usersTable.id,
    name: usersTable.name,
  })
  .from(usersTable)
  .limit(placeholder('limit'))
  .offset(placeholder('offset'))
  .prepare('stmt');

const result = await stmt.execute({ limit: 1, offset: 1 });