@peerbit/indexer-sqlite3 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/peerbit/sqlite3-bundler-friendly.mjs +2578 -3099
- package/dist/peerbit/sqlite3-node.mjs +2578 -3110
- package/dist/peerbit/sqlite3-opfs-async-proxy.js +2 -4
- package/dist/peerbit/sqlite3.js +2581 -3108
- package/dist/peerbit/sqlite3.min.js +1930 -2514
- package/dist/peerbit/sqlite3.mjs +2578 -3099
- package/dist/peerbit/sqlite3.wasm +0 -0
- package/dist/peerbit/sqlite3.worker.min.js +1931 -2515
- package/package.json +3 -3
|
@@ -360,9 +360,7 @@ const installAsyncProxy = function () {
|
|
|
360
360
|
dirHandle: hDir,
|
|
361
361
|
fileHandle: hFile,
|
|
362
362
|
sabView: state.sabFileBufView,
|
|
363
|
-
readOnly: create
|
|
364
|
-
? false
|
|
365
|
-
: state.sq3Codes.SQLITE_OPEN_READONLY & flags,
|
|
363
|
+
readOnly: !create && !!(state.sq3Codes.SQLITE_OPEN_READONLY & flags),
|
|
366
364
|
deleteOnClose: !!(state.sq3Codes.SQLITE_OPEN_DELETEONCLOSE & flags),
|
|
367
365
|
});
|
|
368
366
|
fh.releaseImplicitLocks =
|
|
@@ -430,7 +428,7 @@ const installAsyncProxy = function () {
|
|
|
430
428
|
xUnlock: async function (fid, lockType) {
|
|
431
429
|
let rc = 0;
|
|
432
430
|
const fh = __openFiles[fid];
|
|
433
|
-
if (state.sq3Codes.SQLITE_LOCK_NONE === lockType
|
|
431
|
+
if (fh.syncHandle && state.sq3Codes.SQLITE_LOCK_NONE === lockType) {
|
|
434
432
|
try {
|
|
435
433
|
await closeSyncHandle(fh);
|
|
436
434
|
} catch (e) {
|