maxLen -= 8 /* "-journal" */;
}
const len = n.length;
+ if( !len ) toss3(capi.SQLITE_RANGE,"Empty name is not permitted.");
if( len > maxLen ){
- toss3(capi.SQLITE_RANGE, "Storage name is too long.");
+ toss3(capi.SQLITE_RANGE, "Storage name is too long. Limit =", maxLen);
}
let i;
for( i = 0; i < len; ++i ){
*/
const pFileHandles = new Map();
- if( sqlite3.__isUnderTest ){
- /* For inspection via the dev tools console. */
- sqlite3.kvvfsStuff = {
- pFileHandles,
- cache
- };
- }
-
{
/**
Original WASM functions for methods we partially override.
zName = (cache.zEmpty ??= wasm.allocCString(""));
}
const jzClass = wasm.cstrToJs(zName);
+ debug("xOpen",jzClass);
validateStorageName(jzClass, true);
util.assert( jzClass.length===wasm.cstrlen(zName),
"ASCII-only validation failed" );
- A transient kvvfs storage object name.
In the first two cases, only sessionStorage resp. localStorage is
- cleared. If passed an an empty string (the default) then its
- behavior depends on the second argument:
-
- If emptyIsAName is false (the default) then an empty string means
- both of 'local' and 'session' storage. (For backwards
- compatibility.) if emptyIsAName is true then the empty string is
- treated as a storage name instead.
+ cleared. An empty string resolves to both 'local' and 'session'
+ storage.
Returns the number of entries cleared.
version 1 did not throw for this case was due to an architectural
limitation which has since been overcome.
*/
- capi.sqlite3_js_kvvfs_clear = function callee(which="", emptyIsAName=false){
- if( !which && !emptyIsAName && cache.storagePool.local ){
+ capi.sqlite3_js_kvvfs_clear = function callee(which=""){
+ if( !which ){
return callee('local') + callee('session');
}
const store = storageForZClass(which);
unspecified and may include per-entry overhead invisible to
clients.
*/
- capi.sqlite3_js_kvvfs_size = function callee(which="", emptyIsAName=false){
- if( !which && !emptyIsAName ){
+ capi.sqlite3_js_kvvfs_size = function callee(which=""){
+ if( !which ){
return callee('local') + callee('session');
}
const store = storageForZClass(which);
listen: sqlite3_js_kvvfs_listen,
unlisten: sqlite3_js_kvvfs_unlisten,
exists: (name)=>!!storageForZClass(name),
- // DIFFERENT DEFAULTS for the arguments:
- size: (which,emptyIsAName=true)=>capi.sqlite3_js_kvvfs_size(which,emptyIsAName),
- clear: (which,emptyIsAName=true)=>capi.sqlite3_js_kvvfs_clear(which,emptyIsAName),
+ size: capi.sqlite3_js_kvvfs_size,
+ clear: capi.sqlite3_js_kvvfs_clear
});
+ if( sqlite3.__isUnderTest ){
+ /* For inspection via the dev tools console. */
+ sqlite3.kvvfs.test = {
+ pFileHandles,
+ cache
+ };
+ }
+
if(sqlite3.oo1?.DB){
/**
Functionally equivalent to DB(storageName,'c','kvvfs') except
-C Improve\skvvfs\sfile\sname\svalidation.\sAdd\ssqlite3.kvvfs.unlink().
-D 2025-11-25T18:52:08.177
+C Remove\sthe\sostensible\ssupport\sfor\sempty\skvvfs\snames,\sas\sthose\snames\sapparently\snever\sreach\skvvfs.xOpen\s(the\sempty\sname\sis\sspecial).\sThat\sactually\ssimplifies\sthings\swith\sregards\sto\sbackwards\scompatibility.
+D 2025-11-25T19:05:13.106
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89
F ext/wasm/api/sqlite3-opfs-async-proxy.js 9654b565b346dc609b75d15337f20acfa7af7d9d558da1afeb9b6d8eaa404966
F ext/wasm/api/sqlite3-vfs-helper.c-pp.js 3f828cc66758acb40e9c5b4dcfd87fd478a14c8fb7f0630264e6c7fa0e57515d
-F ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js bd901a57c958a31bbbcaecdb7993467161f38e72b8b5e8c8eaaa898a078b85ea
+F ext/wasm/api/sqlite3-vfs-kvvfs.c-pp.js d61f11929fb1d115c47cf7bdd168229328cfe5bd91fd0faedebd90683c22f83c
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js a2eea6442556867b589e04107796c6e1d04a472219529eeb45b7cd221d7d048b
F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 88ce2078267a2d1af57525a32d896295f4a8db7664de0e17e82dc9ff006ed8d3
F ext/wasm/api/sqlite3-vtab-helper.c-pp.js 9097074724172e31e56ce20ccd7482259cf72a76124213cbc9469d757676da86
F ext/wasm/test-opfs-vfs.js 1618670e466f424aa289859fe0ec8ded223e42e9e69b5c851f809baaaca1a00c
F ext/wasm/tester1-worker.c-pp.html 0e432ec2c0d99cd470484337066e8d27e7aee4641d97115338f7d962bf7b081a
F ext/wasm/tester1.c-pp.html 52d88fe2c6f21a046030a36410b4839b632f4424028197a45a3d5669ea724ddb
-F ext/wasm/tester1.c-pp.js 87a6276e7f5970d5c6bd51a00972ee22230ada535793518b90f3524969592a56
+F ext/wasm/tester1.c-pp.js e224b2c827a40a915c8b8a68d12bfed1c8c8fce59f9722b28fc8993e1cdcc5e8
F ext/wasm/tests/opfs/concurrency/index.html 657578a6e9ce1e9b8be951549ed93a6a471f4520a99e5b545928668f4285fb5e
F ext/wasm/tests/opfs/concurrency/test.js d08889a5bb6e61937d0b8cbb78c9efbefbf65ad09f510589c779b7cc6a803a88
F ext/wasm/tests/opfs/concurrency/worker.js 0a8c1a3e6ebb38aabbee24f122693f1fb29d599948915c76906681bb7da1d3d2
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 02793c5905e6b99379cd5ad6bfe1eb6cccf839da081fc174dce7b06245e212fb
-R ed6be124fc5c288abe328108bd2f7a96
+P 0dfdf4681cf63541de971a20be21b33d0d3b38e8281f302d20aca9492df3da42
+R 89cd8bf5982ad483b1695fb89098bc74
U stephan
-Z 630b67750a1abe72dfc01e3136fc3599
+Z 4bbc18df06e712b9f72a91bc732373ca
# Remove this line to create a well-formed Fossil manifest.