From f69426a7c5cea3dbbbf898d3b06fcdbad5ab2c12 Mon Sep 17 00:00:00 2001 From: Donghoon Kang Date: Thu, 29 Oct 2026 08:17:28 +0900 Subject: [PATCH] doc: fix sqlite tagged template examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: HoonDongKang PR-URL: https://github.com/nodejs/node/pull/66920 Reviewed-By: Trivikram Kamat Reviewed-By: Guilherme Araújo --- 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 c041f89b096..8569b5fc036 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -779,13 +779,13 @@ statement for future use. > literals, where it performs string interpolation. > > ```js -> // This a safe example of binding a parameter to a tagged statement. +> // This is a safe example of binding a parameter to a tagged statement. > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`; > > // This is an *unsafe* example of an untagged template string. > // `id` is interpolated into the query text as a string. > // This can lead to SQL injection and data corruption. -> db.run(`INSERT INTO t1 (id) VALUES (${id})`); +> db.exec(`INSERT INTO t1 (id) VALUES (${id})`); > ``` The tag store will match a statement from the cache if the query strings