Hello there
I'm trying to make a simple code like this one below work, but it doesn't.
Reactive session poorly documented in the JavaScript driver manual.
Here is the code:
function readTimebarDataReactive(entity,timebar) {
start = new Date().getTime();
session
.run(queryTemplates[entity])
.records()
.pipe(
map(record => record.get('item')),
concat(rxSession.close())
)
.subscribe({
next: data => {
timebar.merge(data)
console.log(data)
},
complete: () => {
timeElapsed('Completed', start)
timebar.zoom('fit', { animate: false })
},
error: err => console.log(err)
})
};
I tried it many times, always the same thing, the functions map and concat in the pipe function are not defined.