doc: fix sqlite tagged template examples

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/66920
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
This commit is contained in:
Donghoon Kang authored and Antoine du Hamel committed 2026-11-12 17:45:27 +01:00
1 parent af7b97d574
commit f69426a7c5
1 file changed
+2 -2
+2 -2
View File
@@ -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