synopsys
Version:
Synopsys is proof of concept datastore service. It stores facts in terms of entity attribute value triples and allows clients to subscribe to _(datomic inspired)_ queries pushing updates to them when new transactions affect results.
21 lines (18 loc) • 460 B
JavaScript
import * as Task from './task.js'
/**
* @typedef {{url: URL}} Open
*/
/**
* Connects to the service by opening the underlying store.
*
* @param {Open} source
*/
export function* open(source) {
if (source.url.protocol === 'memory:') {
const Memory = yield* Task.wait(import('./blob/memory.js'))
return yield* Memory.open(source)
} else {
const Disk = yield* Task.wait(import('./blob/disk.js'))
return yield* Disk.open(source)
}
}