Skip to content

Commit 987a023

Browse files
avivkelleraduh95
authored andcommitted
doc: createSQLTagStore -> createTagStore
PR-URL: #60182 Refs: https://discord.com/channels/425824580918181889/425824580918181891/1425966053242048584 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 40c984d commit 987a023

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/sqlite.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ added: v22.5.0
426426
Compiles a SQL statement into a [prepared statement][]. This method is a wrapper
427427
around [`sqlite3_prepare_v2()`][].
428428

429-
### `database.createSQLTagStore([maxSize])`
429+
### `database.createTagStore([maxSize])`
430430

431431
<!-- YAML
432432
added: v24.9.0
@@ -450,7 +450,7 @@ avoid the overhead of repeatedly parsing and preparing the same SQL statements.
450450
import { DatabaseSync } from 'node:sqlite';
451451

452452
const db = new DatabaseSync(':memory:');
453-
const sql = db.createSQLTagStore();
453+
const sql = db.createTagStore();
454454

455455
db.exec('CREATE TABLE users (id INT, name TEXT)');
456456

@@ -625,14 +625,14 @@ added: v24.9.0
625625
This class represents a single LRU (Least Recently Used) cache for storing
626626
prepared statements.
627627

628-
Instances of this class are created via the database.createSQLTagStore() method,
628+
Instances of this class are created via the database.createTagStore() method,
629629
not by using a constructor. The store caches prepared statements based on the
630630
provided SQL query string. When the same query is seen again, the store
631631
retrieves the cached statement and safely applies the new values through
632632
parameter binding, thereby preventing attacks like SQL injection.
633633

634634
The cache has a maxSize that defaults to 1000 statements, but a custom size can
635-
be provided (e.g., database.createSQLTagStore(100)). All APIs exposed by this
635+
be provided (e.g., database.createTagStore(100)). All APIs exposed by this
636636
class execute synchronously.
637637

638638
### `sqlTagStore.all(sqlTemplate[, ...values])`

0 commit comments

Comments
 (0)