Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ key: 't', value: ['timestamp'] },
{ key: 'ir', value: [['index'], ['random']] },
{ key: 'rt', value: [['random'], ['timestamp']] },
{ key: 'ti', value: [['timestamp'], ['index']] },
{ key: 'ri', value: [['random'], ['index']] },
{ key: 'tr', value: [['timestamp'], ['random'], ] },
{ key: 'it', value: [['index'], ['timestamp']] },
]
var raw = []
var dbPath = path.join(osenv.tmpdir(), 'test_stream-view_random')
rimraf.sync(dbPath)
var db = Flume(FlumeLog(path.join(dbPath, 'log.offset'), 1024, codec.json))
.use('query', Query(1, {indexes: indexes}))
var query = db.query
test('preinit', function (t) {
query.since.once(function (v) {
t.equal(v, -1)
t.end()
})
})
var data = []
test('init', function (t) {
for(var i = 0; i < 100; i++)
data.push({
tape('simple', function (t) {
var linksPath = path.join(osenv.tmpdir(), 'test_stream-view_links')
rimraf.sync(linksPath)
var db = Flume(FlumeLog(path.join(linksPath, 'log.offset'), 1024, codec.json))
.use('links', Links(indexes, extract))
var links = db.links
t.test('init', function (t) {
links.since.once(function (v) {
t.equal(v, -1)
t.end()
})
})
var live = []
pull(
links.read({query: [{$filter: {rel: {$prefix: 'e'}}}], live: true, sync: false}),