@live-change/db-web 0.6.3 → 0.6.5
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 +5 -5
- package/package.json +7 -7
package/lib/dbDao.js
CHANGED
|
@@ -231,7 +231,7 @@ function localRequests(server, scriptContext) {
|
|
|
231
231
|
if(!dbName) throw new Error("databaseNameRequired")
|
|
232
232
|
const db = server.databases.get(dbName)
|
|
233
233
|
if(!db) throw new Error('databaseNotFound')
|
|
234
|
-
const queryFunction = scriptContext.
|
|
234
|
+
const queryFunction = scriptContext.getOrCreateFunction(code, `query`)
|
|
235
235
|
return db.queryUpdate((input, output) => queryFunction(input, output, params))
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -813,7 +813,7 @@ function localReads(server, scriptContext) {
|
|
|
813
813
|
if(!dbName) return new ReactiveDao.ObservableError("databaseNameRequired")
|
|
814
814
|
const db = server.databases.get(dbName)
|
|
815
815
|
if(!db) return new ReactiveDao.ObservableError('databaseNotFound')
|
|
816
|
-
const queryFunction = scriptContext.
|
|
816
|
+
const queryFunction = scriptContext.getOrCreateFunction(code, 'queryCode:' + sourceName)
|
|
817
817
|
return db.queryObservable(async (input, output) => {
|
|
818
818
|
return queryFunction(input, output, params)
|
|
819
819
|
})
|
|
@@ -822,7 +822,7 @@ function localReads(server, scriptContext) {
|
|
|
822
822
|
if(!dbName) throw new Error("databaseNameRequired")
|
|
823
823
|
const db = server.databases.get(dbName)
|
|
824
824
|
if(!db) throw new Error('databaseNotFound')
|
|
825
|
-
const queryFunction = scriptContext.
|
|
825
|
+
const queryFunction = scriptContext.getOrCreateFunction(code, 'queryCode:' + sourceName)
|
|
826
826
|
return db.queryGet((input, output) => queryFunction(input, output, params))
|
|
827
827
|
}
|
|
828
828
|
},
|
|
@@ -831,7 +831,7 @@ function localReads(server, scriptContext) {
|
|
|
831
831
|
if(!dbName) return new ReactiveDao.ObservableError("databaseNameRequired")
|
|
832
832
|
const db = server.databases.get(dbName)
|
|
833
833
|
if(!db) return new ReactiveDao.ObservableError('databaseNotFound')
|
|
834
|
-
const queryFunction = scriptContext.
|
|
834
|
+
const queryFunction = scriptContext.getOrCreateFunction(code, 'queryCode:' + sourceName)
|
|
835
835
|
return db.queryObjectObservable(async (input, output) => {
|
|
836
836
|
return queryFunction(input, output, params)
|
|
837
837
|
})
|
|
@@ -840,7 +840,7 @@ function localReads(server, scriptContext) {
|
|
|
840
840
|
if(!dbName) throw new Error("databaseNameRequired")
|
|
841
841
|
const db = server.databases.get(dbName)
|
|
842
842
|
if(!db) throw new Error('databaseNotFound')
|
|
843
|
-
const queryFunction = scriptContext.
|
|
843
|
+
const queryFunction = scriptContext.getOrCreateFunction(code, 'queryCode:' + sourceName)
|
|
844
844
|
return db.queryObjectGet((input, output) => queryFunction(input, output, params))
|
|
845
845
|
}
|
|
846
846
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/db-web",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "michal@laszczewski.com",
|
|
6
6
|
"name": "Michał Łaszczewski",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"tape": "^5.3.2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@live-change/dao": "0.5.
|
|
33
|
-
"@live-change/db": "^0.6.
|
|
34
|
-
"@live-change/db-store-indexeddb": "^0.6.
|
|
35
|
-
"@live-change/db-store-localstorage": "^0.6.
|
|
36
|
-
"@live-change/db-store-rbtree": "^0.6.
|
|
32
|
+
"@live-change/dao": "0.5.17",
|
|
33
|
+
"@live-change/db": "^0.6.5",
|
|
34
|
+
"@live-change/db-store-indexeddb": "^0.6.5",
|
|
35
|
+
"@live-change/db-store-localstorage": "^0.6.5",
|
|
36
|
+
"@live-change/db-store-rbtree": "^0.6.5",
|
|
37
37
|
"debug": "^4.3.4"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "59500898eff7eba564a06bec348cb34965b38b0a"
|
|
40
40
|
}
|