kappa-view-query
Advanced tools
Comparing version 3.0.0-alpha1 to 3.0.0
const through = require('through2') | ||
const memdb = require('memdb') | ||
const memdb = require('level-mem') | ||
const charwise = require('charwise') | ||
@@ -55,5 +55,3 @@ const { EventEmitter } = require('events') | ||
gte: [idx.key, ...__opts.gte], | ||
keyEncoding, | ||
keys: true, | ||
values: true | ||
keyEncoding | ||
}) | ||
@@ -60,0 +58,0 @@ |
{ | ||
"name": "kappa-view-query", | ||
"version": "3.0.0-alpha1", | ||
"description": "define your own indexes and execute map-filter-reduce queries over a set of hypercores using kappa-core", | ||
"version": "3.0.0", | ||
"description": "execute map-filter-reduce queries over a kappa-core", | ||
"author": "kyphae", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kappa-db/kappa-view-query.git" | ||
}, | ||
"scripts": { | ||
@@ -28,5 +26,6 @@ "test": "tape test/**/*.test.js | tap-spec", | ||
"hypercore": "^8.4.1", | ||
"kappa-core": "github:Frando/kappa-core#kappa5-new", | ||
"kappa-core": "github:Frando/kappa-core#exp-0.2.3", | ||
"kappa-sparse-indexer": "^0.6.0", | ||
"level": "^5.0.1", | ||
"memdb": "^1.3.1", | ||
"level-mem": "^5.0.1", | ||
"mkdirp": "^0.5.1", | ||
@@ -37,3 +36,3 @@ "multifeed": "5.1.1", | ||
"rimraf": "^2.6.3", | ||
"subleveldown": "^4.1.4", | ||
"subleveldown": "^5.0.0", | ||
"tap-spec": "^5.0.0", | ||
@@ -44,4 +43,9 @@ "tape": "^4.11.0", | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/kappa-db/kappa-view-query.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/kappa-db/kappa-view-query/issues" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # Kappa View Query | ||
`kappa-view-query` uses a key / value store to compose a single index either in memory (using `memdb`) or stored as a file (using `level`). Each time a message is published to a feed, or is received via replication, `kappa-view-query` checks to see if any of the message's fields match any of the indexes. | ||
`kappa-view-query` uses a key / value store to compose a single index either in memory (using `level-mem`) or stored as a file (using `level`). Each time a message is published to a feed, or is received via replication, `kappa-view-query` checks to see if any of the message's fields match any of the indexes. | ||
@@ -50,3 +50,3 @@ We can define an index like this: | ||
In the case of the above dataset and query, the closest matching index is the one we provided above, named `typ`. At this point, `kappa-view-query` can then reduce the scope of our index file significantly, by filtering all references in our level or memdb, greater than or equal to `typ!chat/message!1566486000000`, but less than or equal to `type!chat/message!1566478800000`. This gives us a subset of references with which we can fetch the actual messages from our hypercore feeds. | ||
In the case of the above dataset and query, the closest matching index is the one we provided above, named `typ`. At this point, `kappa-view-query` can then reduce the scope of our index file significantly, by filtering all references in our level or level-mem, greater than or equal to `typ!chat/message!1566486000000`, but less than or equal to `type!chat/message!1566478800000`. This gives us a subset of references with which we can fetch the actual messages from our hypercore feeds. | ||
@@ -64,3 +64,3 @@ ## Usage | ||
const collect = require('collect-stream') | ||
const memdb = require('memdb') | ||
const memdb = require('level-mem') | ||
const sub = require('subleveldown') | ||
@@ -117,3 +117,3 @@ | ||
const collect = require('collect-stream') | ||
const memdb = require('memdb') | ||
const memdb = require('level-mem') | ||
const sub = require('subleveldown') | ||
@@ -120,0 +120,0 @@ |
@@ -8,3 +8,3 @@ const { describe } = require('tape-plus') | ||
const ram = require('random-access-memory') | ||
const memdb = require('memdb') | ||
const memdb = require('level-mem') | ||
const sub = require('subleveldown') | ||
@@ -301,4 +301,4 @@ const level = require('level') | ||
core.ready('query', () => { | ||
var batch2 = seeds.slice(3, 5) | ||
feed2.append(batch2, (err, _) => { | ||
var batch1 = seeds.slice(0, 3) | ||
feed1.append(batch1, (err, _) => { | ||
assert.error(err, 'no error') | ||
@@ -309,4 +309,4 @@ }) | ||
core.ready('query', () => { | ||
var batch1 = seeds.slice(0, 3) | ||
feed1.append(batch1, (err, _) => { | ||
var batch2 = seeds.slice(3, 5) | ||
feed2.append(batch2, (err, _) => { | ||
assert.error(err, 'no error') | ||
@@ -313,0 +313,0 @@ }) |
@@ -36,3 +36,3 @@ const rimraf = require('rimraf') | ||
function tmp () { | ||
var tmpDir = tmpdir().name | ||
var tmpDir = './'+tmpdir().name | ||
mkdirp.sync(tmpDir) | ||
@@ -39,0 +39,0 @@ return tmpDir |
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
spdx disjunction for an artifact's license information
Licensespdx disjunction for an artifact's license information
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16
1232
0
1
50768
16