From 7baea8c6fb102dc55f75d9ccfd62fbeeed337f5a Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Thu, 6 Aug 2026 17:43:03 +0000 Subject: [PATCH 1/3] doc: document close() error when in a sqlite callback Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> --- doc/api/sqlite.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index ae194ff2aca..9d0e4509c89 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -309,7 +309,10 @@ added: v22.5.0 --> Closes the database connection. An exception is thrown if the database is not -open. This method is a wrapper around [`sqlite3_close_v2()`][]. +open. An \[`ERR_INVALID_STATE`]\[] error is thrown if the method is called while a +statement is executing, for example from a user-defined function, an aggregate +function, or an authorizer callback. This method is a wrapper around +[`sqlite3_close_v2()`][]. ### `database.loadExtension(path[, entryPoint])` From ce1d2853a4db9ce6d607ad9082f9653dd298d69a Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Fri, 7 Aug 2026 08:09:22 -0700 Subject: [PATCH 2/3] fixup! doc: use "such as" instead of "for example from" --- doc/api/sqlite.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index 9d0e4509c89..56dfd9e614d 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -309,8 +309,8 @@ added: v22.5.0 --> Closes the database connection. An exception is thrown if the database is not -open. An \[`ERR_INVALID_STATE`]\[] error is thrown if the method is called while a -statement is executing, for example from a user-defined function, an aggregate +open. An \[`ERR_INVALID_STATE`]\[] error is thrown if the method is called while +a statement is executing, such as inside a user-defined function, an aggregate function, or an authorizer callback. This method is a wrapper around [`sqlite3_close_v2()`][]. From ec4a54120be47ae05231c7b9cbb91ca610fac306 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Sun, 9 Aug 2026 16:31:08 -0700 Subject: [PATCH 3/3] fixup! doc: use ref for ERR_INVALID_STATE --- doc/api/sqlite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index 56dfd9e614d..7850a7b2dc9 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -309,7 +309,7 @@ added: v22.5.0 --> Closes the database connection. An exception is thrown if the database is not -open. An \[`ERR_INVALID_STATE`]\[] error is thrown if the method is called while +open. An [`ERR_INVALID_STATE`][] error is thrown if the method is called while a statement is executing, such as inside a user-defined function, an aggregate function, or an authorizer callback. This method is a wrapper around [`sqlite3_close_v2()`][].