| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1b22f60 commit d54e6ae
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -436,7 +436,7 @@ added: v22.5.0 | |||
| 436 | 436 | Compiles a SQL statement into a [prepared statement][]. This method is a wrapper | |
| 437 | 437 | around [`sqlite3_prepare_v2()`][]. | |
| 438 | 438 | ||
| 439 | - ### `database.createSQLTagStore([maxSize])` | ||
| 439 | + ### `database.createTagStore([maxSize])` | ||
| 440 | 440 | ||
| 441 | 441 | <!-- YAML | |
| 442 | 442 | added: v24.9.0 | |
@@ -460,7 +460,7 @@ avoid the overhead of repeatedly parsing and preparing the same SQL statements. | |||
| 460 | 460 | import { DatabaseSync } from 'node:sqlite'; | |
| 461 | 461 | ||
| 462 | 462 | const db = new DatabaseSync(':memory:'); | |
| 463 | - const sql = db.createSQLTagStore(); | ||
| 463 | + const sql = db.createTagStore(); | ||
| 464 | 464 | ||
| 465 | 465 | db.exec('CREATE TABLE users (id INT, name TEXT)'); | |
| 466 | 466 | ||
@@ -635,14 +635,14 @@ added: v24.9.0 | |||
| 635 | 635 | This class represents a single LRU (Least Recently Used) cache for storing | |
| 636 | 636 | prepared statements. | |
| 637 | 637 | ||
| 638 | - Instances of this class are created via the database.createSQLTagStore() method, | ||
| 638 | + Instances of this class are created via the database.createTagStore() method, | ||
| 639 | 639 | not by using a constructor. The store caches prepared statements based on the | |
| 640 | 640 | provided SQL query string. When the same query is seen again, the store | |
| 641 | 641 | retrieves the cached statement and safely applies the new values through | |
| 642 | 642 | parameter binding, thereby preventing attacks like SQL injection. | |
| 643 | 643 | ||
| 644 | 644 | 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 | ||
| 646 | 646 | class execute synchronously. | |
| 647 | 647 | ||
| 648 | 648 | ### `sqlTagStore.all(sqlTemplate[, ...values])` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments