}
this.db = arguments[0];
__ptrMap.set(this, arguments[1]);
- if( arguments.length>3 && false===arguments[3] ){
+ if( arguments.length>3 && !!arguments[3] ){
__doesNotOwnHandle.add(this);
}
};
},
/**
Finalizes all open statements and closes this database
- connection. This is a no-op if the db has already been
- closed. After calling close(), `this.pointer` will resolve to
- `undefined`, so that can be used to check whether the db
- instance is still opened.
+ connection (with one exception noted below). This is a no-op if
+ the db has already been closed. After calling close(),
+ `this.pointer` will resolve to `undefined`, and that can be
+ used to check whether the db instance is still opened.
If this.onclose.before is a function then it is called before
any close-related cleanup.
all, will never trigger close(), so onclose handlers are not a
reliable way to implement close-time cleanup or maintenance of
a db.
+
+ If this instance was created using DB.wrapHandle() and does not
+ own this.pointer then it does not close the db handle but it
+ does perform all other work, such as calling onclose callbacks
+ and disassociating this object from this.pointer.
*/
close: function(){
const pDb = this.pointer;
The first argument must be either a non-NULL (sqlite3*) WASM
pointer or a non-close()d instance of oo1.DB.
- The second argument only applies if the first argument is a
- (sqlite3*). If it is, the returned object will pass that pointer
- to sqlite3_close() when its close() method is called, otherwise
- it will not.
+ The second argument, defaulting to false, only applies if the
+ first argument is a (sqlite3*). If it is, the returned object
+ will pass that pointer to sqlite3_close() when its close() method
+ is called, otherwise it will not.
If the first argument is a oo1.DB object, the second argument is
disregarded and the returned object will be created as a
The second argument must be a valid WASM (sqlite3_stmt*), as
produced by sqlite3_prepare_v2() and sqlite3_prepare_v3().
- The third argument specifies whether the returned Stmt object
- takes over ownership of the underlying (sqlite3_stmt*). If true,
- the returned object's finalize() method will finalize that
- handle, else it will not. If it is false, ownership of stmtPtr is
- unchanged and stmtPtr MUST outlive the returned object or results
- are undefined.
+ The third argument, defaulting to false, specifies whether the
+ returned Stmt object takes over ownership of the underlying
+ (sqlite3_stmt*). If true, the returned object's finalize() method
+ will finalize that handle, else it will not. If it is false,
+ ownership of stmtPtr is unchanged and stmtPtr MUST outlive the
+ returned object or results are undefined.
This function throws if the arguments are invalid. On success it
returns a new Stmt object which wraps the given statement
-C Experimentally\sadd\ssqlite3.oo1.DB/Stmt.wrapHandle(),\swhich\sallow\sDB/Stmt\sinstances\sto\swrap\sa\s(sqlite3*)/(sqlite3_stmt*)\soptionally\swith\sor\swithout\staking\sownership\sof\sit.\sThe\sintent\sis\sto\senable\smix-and-match\suse\sof\sthe\sC\sAPI,\sthe\soo1\sAPI,\sand\sany\sother\shypothetical\sAPI\swhich\sexposes\sthose\spointers.\soo1.Stmt.parameterCount\sis\snow\sa\sproperty\saccess\sinterceptor\slike\sStmt.columnCount\sis,\sbut\sthat\sdoesn't\schange\show\sit's\sused.
-D 2025-07-06T15:01:44.333
+C JS\sdoc\sadditions.
+D 2025-07-06T15:13:06.902
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/wasm/api/pre-js.c-pp.js a614a2c82b12c4d96d8e3ba77330329efc53c4d56a8a7e60ade900f341866cfb
F ext/wasm/api/sqlite3-api-cleanup.js 3ac1786e461ada63033143be8c3b00b26b939540661f3e839515bb92f2e35359
F ext/wasm/api/sqlite3-api-glue.c-pp.js 0b76510f3650053bac67ca8947cb6ab9d050ad2218118a2e7796dd37be832ffa
-F ext/wasm/api/sqlite3-api-oo1.c-pp.js 44d122b6d22ba9caa644193357a03bf5d2678a7815f1e2bbbdb086b14db11b7e
+F ext/wasm/api/sqlite3-api-oo1.c-pp.js dc3b30cefa93e6dd9f2b827e31acacbfc2acd522d5ca4d46e977dacc4261398f
F ext/wasm/api/sqlite3-api-prologue.js 8708570165f5b4bce9a78ccd91bc9ddf8735970ac1c4d659e36c9a7d9a644bb4
F ext/wasm/api/sqlite3-api-worker1.c-pp.js f646a65257973b8c4481f8a6a216370b85644f23e64b126e7ae113570587c0ab
F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c60907e77b32824aaaf024d299cdaf161b5f64fc927ffe5d5455eeb5754e6b01
-R 23984087c5c98e4f1ed7d33ca211546f
-T *branch * oo1-unowned-handles
-T *sym-oo1-unowned-handles *
-T -sym-trunk * Cancelled\sby\sbranch.
+P 1227543b87c3320d6b80e0f61b88ea53b68779966a0295c4d6a1db6369c48207
+R cef3ddc9e77c9bf23d0de246f8a430aa
U stephan
-Z 3bad3f183e619bbd50d1bebd9118b331
+Z 86c577d4430c4b03afa5e02f4812dc59
# Remove this line to create a well-formed Fossil manifest.