aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-oo1.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2025-07-11 19:44:42 +0000
committerstephan <stephan@noemail.net>2025-07-11 19:44:42 +0000
commit1f68085849b247a6a1773603cd56d915a1c5ce92 (patch)
treec17b3b701a030d3e64e4babbbc0c5a8ba46ff4fa /ext/wasm/api/sqlite3-api-oo1.c-pp.js
parentc493e4516aa4b45f98c29e546bb424974839846a (diff)
downloadsqlite-1f68085849b247a6a1773603cd56d915a1c5ce92.tar.gz
sqlite-1f68085849b247a6a1773603cd56d915a1c5ce92.zip
Clearer docs for the unowned db/stmt handle mechanism.
FossilOrigin-Name: 53401b5435e30c4b47b6e203976b714d616246d734b5876a34f53f6388f872f8
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-api-oo1.c-pp.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.c-pp.js b/ext/wasm/api/sqlite3-api-oo1.c-pp.js
index f92dde48a..62c44fa9d 100644
--- a/ext/wasm/api/sqlite3-api-oo1.c-pp.js
+++ b/ext/wasm/api/sqlite3-api-oo1.c-pp.js
@@ -39,12 +39,15 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
const __ptrMap = new WeakMap();
/**
A Set of oo1.DB or oo1.Stmt objects which are proxies for
- (sqlite3*) resp. (sqlite3_stmt*) pointers. Such objects
- optionally do not own their underlying handle and that handle
- must be guaranteed (by the client) to outlive the proxy. These
- proxies are primarily intended as a way to briefly wrap an
- (sqlite3[_stmt]*) object as an oo1.DB/Stmt without taking over
- ownership.
+ (sqlite3*) resp. (sqlite3_stmt*) pointers which themselves are
+ owned elsewhere. Objects in this Set do not own their underlying
+ handle and that handle must be guaranteed (by the client) to
+ outlive the proxy. DB.close()/Stmt.finalize() methods will remove
+ the object from this Set _instead_ of closing/finalizing the
+ pointer. These proxies are primarily intended as a way to briefly
+ wrap an (sqlite3[_stmt]*) object as an oo1.DB/Stmt without taking
+ over ownership, to take advantage of simplifies usage compared to
+ the C API while not imposing any change of ownership.
See DB.wrapHandle() and Stmt.wrapHandle().
*/