Skip to content

Commit f69426a

Browse files
HoonDongKangaduh95
authored andcommitted
doc: fix sqlite tagged template examples
Signed-off-by: HoonDongKang <d159123@naver.com> PR-URL: #66920 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
1 parent af7b97d commit f69426a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎doc/api/sqlite.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,13 +779,13 @@ statement for future use.
779779
> literals, where it performs string interpolation.
780780
>
781781
> ```js
782-
> // This a safe example of binding a parameter to a tagged statement.
782+
> // This is a safe example of binding a parameter to a tagged statement.
783783
> sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`;
784784
>
785785
> // This is an *unsafe* example of an untagged template string.
786786
> // `id` is interpolated into the query text as a string.
787787
> // This can lead to SQL injection and data corruption.
788-
> db.run(`INSERT INTO t1 (id) VALUES (${id})`);
788+
> db.exec(`INSERT INTO t1 (id) VALUES (${id})`);
789789
> ```
790790
791791
The tag store will match a statement from the cache if the query strings

0 commit comments

Comments
 (0)