From 287de9b14027ef947a1debd1f86a4ce3916b0e34 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Sun, 13 Oct 2024 17:19:07 +0200 Subject: [PATCH] fix(sql): Fix QueryResult typings closes #1893 --- plugins/sql/guest-js/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sql/guest-js/index.ts b/plugins/sql/guest-js/index.ts index 05eed0e3..74f6dc7b 100644 --- a/plugins/sql/guest-js/index.ts +++ b/plugins/sql/guest-js/index.ts @@ -10,12 +10,12 @@ export interface QueryResult { /** * The last inserted `id`. * - * This value is always `0` when using the Postgres driver. If the + * This value is not set for Postgres databases. If the * last inserted id is required on Postgres, the `select` function * must be used, with a `RETURNING` clause * (`INSERT INTO todos (title) VALUES ($1) RETURNING id`). */ - lastInsertId: number + lastInsertId?: number } /**