Module

x/kysely_postgrs_js_dialect/deps.ts>kysely.UpdateQueryBuilder#limit

Kysely dialect for PostgreSQL using the Postgres.js client.
method kysely.UpdateQueryBuilder.prototype.limit
import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { UpdateQueryBuilder } = kysely;

Adds a limit clause to the update query for supported databases, such as MySQL.

Examples

Update the first 2 rows in the 'person' table:

return await db
  .updateTable('person')
  .set({ first_name: 'Foo' })
  .limit(2);

The generated SQL (MySQL):

update `person` set `first_name` = 'Foo' limit 2

Parameters

limit: ValueExpression<DB, TB, number>