Skip to content

Commit d54e6ae

Browse files
authored
doc: createSQLTagStore -> createTagStore
PR-URL: #60182 Refs: https://discord.com/channels/425824580918181889/425824580918181891/1425966053242048584 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 1b22f60 commit d54e6ae

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
@@ -436,7 +436,7 @@ added: v22.5.0
436436
Compiles a SQL statement into a [prepared statement][]. This method is a wrapper
437437
around [`sqlite3_prepare_v2()`][].
438438

439-
### `database.createSQLTagStore([maxSize])`
439+
### `database.createTagStore([maxSize])`
440440

441441
<!-- YAML
442442
added: v24.9.0
@@ -460,7 +460,7 @@ avoid the overhead of repeatedly parsing and preparing the same SQL statements.
460460
import { DatabaseSync } from 'node:sqlite';
461461

462462
const db = new DatabaseSync(':memory:');
463-
const sql = db.createSQLTagStore();
463+
const sql = db.createTagStore();
464464

465465
db.exec('CREATE TABLE users (id INT, name TEXT)');
466466

@@ -635,14 +635,14 @@ added: v24.9.0
635635
This class represents a single LRU (Least Recently Used) cache for storing
636636
prepared statements.
637637

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

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

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

0 commit comments

Comments
 (0)