@live-change/db-web 0.8.24 → 0.8.27
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/lib/dbDao.js +8 -0
- package/package.json +7 -7
package/lib/dbDao.js
CHANGED
|
@@ -226,6 +226,14 @@ function localRequests(server, scriptContext) {
|
|
|
226
226
|
if(!log) throw new Error("logNotFound")
|
|
227
227
|
return log.putOld(object)
|
|
228
228
|
},
|
|
229
|
+
clearLog: (dbName, logName, before) => {
|
|
230
|
+
if(dbName === 'system') throw new Error("system database is not writable")
|
|
231
|
+
const db = server.databases.get(dbName)
|
|
232
|
+
if(!db) throw new Error('databaseNotFound')
|
|
233
|
+
const log = db.log(logName)
|
|
234
|
+
if(!log) throw new Error("logNotFound")
|
|
235
|
+
return log.clear(before)
|
|
236
|
+
},
|
|
229
237
|
query: (dbName, code, params) => {
|
|
230
238
|
if(dbName === 'system') throw new Error("system database is not writable")
|
|
231
239
|
if(!dbName) throw new Error("databaseNameRequired")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-web",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.27",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "michal@laszczewski.com",
|
|
6
6
|
"name": "Michał Łaszczewski",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"type": "module",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@live-change/dao": "^0.8.
|
|
33
|
-
"@live-change/db": "^0.8.
|
|
34
|
-
"@live-change/db-store-indexeddb": "^0.8.
|
|
35
|
-
"@live-change/db-store-localstorage": "^0.8.
|
|
36
|
-
"@live-change/db-store-rbtree": "^0.8.
|
|
32
|
+
"@live-change/dao": "^0.8.27",
|
|
33
|
+
"@live-change/db": "^0.8.27",
|
|
34
|
+
"@live-change/db-store-indexeddb": "^0.8.27",
|
|
35
|
+
"@live-change/db-store-localstorage": "^0.8.27",
|
|
36
|
+
"@live-change/db-store-rbtree": "^0.8.27",
|
|
37
37
|
"debug": "^4.3.4"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "9a84f91121fb5fc2c9fd2acb9a7e5a0a952d611e"
|
|
40
40
|
}
|