@rpcbase/client 0.46.0 → 0.47.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.46.0",
3
+ "version": "0.47.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },
@@ -124,12 +124,9 @@ const log = debug("rb:store")
124
124
  const run_query = async({model_name, query, query_key, options}, callback) => {
125
125
  // console.log("ALAAARM")
126
126
  // console.log("run_query", {model_name, query, query_key, options})
127
-
128
127
  // console.time("store run_query")
129
-
130
128
  const col = get_collection(model_name)
131
129
 
132
-
133
130
  // https://github.com/pouchdb/pouchdb/tree/master/packages/node_modules/pouchdb-find#dbcreateindexindex--callback
134
131
  const {docs} = await col.find({
135
132
  // TODO: we should check if the selectors are compatible here
@@ -139,7 +136,6 @@ const run_query = async({model_name, query, query_key, options}, callback) => {
139
136
  // fields: [""]
140
137
  })
141
138
 
142
-
143
139
  const mapped_docs = docs.map(({_rev, ...doc}) => {
144
140
  // TODO: handle projections here
145
141
  const remapped_doc = Object.entries(doc).reduce((new_doc, [key, value]) => {
@@ -151,7 +147,6 @@ const run_query = async({model_name, query, query_key, options}, callback) => {
151
147
  return remapped_doc
152
148
  })
153
149
 
154
- // console.log("FOUND INITIAL", mapped_docs)
155
150
  // console.timeEnd("store run_query")
156
151
 
157
152
  callback(null, mapped_docs, {source: "cache"})