@live-change/db-web 0.9.98 → 0.9.99
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 +2 -2
- package/package.json +7 -7
package/lib/dbDao.js
CHANGED
|
@@ -226,13 +226,13 @@ 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) => {
|
|
229
|
+
clearLog: (dbName, logName, before, maxCount) => {
|
|
230
230
|
if(dbName === 'system') throw new Error("system database is not writable")
|
|
231
231
|
const db = server.databases.get(dbName)
|
|
232
232
|
if(!db) throw new Error('databaseNotFound')
|
|
233
233
|
const log = db.log(logName)
|
|
234
234
|
if(!log) throw new Error("logNotFound")
|
|
235
|
-
return log.clear(before)
|
|
235
|
+
return log.clear(before, maxCount || Infinity)
|
|
236
236
|
},
|
|
237
237
|
query: (dbName, code, params) => {
|
|
238
238
|
if(dbName === 'system') throw new Error("system database is not writable")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-web",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.99",
|
|
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.9.
|
|
33
|
-
"@live-change/db": "^0.9.
|
|
34
|
-
"@live-change/db-store-indexeddb": "^0.9.
|
|
35
|
-
"@live-change/db-store-localstorage": "^0.9.
|
|
36
|
-
"@live-change/db-store-rbtree": "^0.9.
|
|
32
|
+
"@live-change/dao": "^0.9.99",
|
|
33
|
+
"@live-change/db": "^0.9.99",
|
|
34
|
+
"@live-change/db-store-indexeddb": "^0.9.99",
|
|
35
|
+
"@live-change/db-store-localstorage": "^0.9.99",
|
|
36
|
+
"@live-change/db-store-rbtree": "^0.9.99",
|
|
37
37
|
"debug": "^4.3.4"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "be394720644be1eea528f1f5272dd8066081bc93"
|
|
40
40
|
}
|