Hello !
I am currently testing neo4j inside a async framework
Reading of node is done with this code
fun <T> read(query: String, action: Action<T>): Multi<T> =
Multi.createFrom().resource(driver::rxSession) { rxs ->
rxs.readTransaction { tx ->
val rs = tx.run(query.trimIndent())
Multi.createFrom().publisher(rs.records()).map {
action(it)
}
}
}.withFinalizer(Consumer { it.uniClose() })
What I do not understand is when I want to update I changed the code to a write transaction with this query
MATCH (d:Descriptable {key:"Robbie"})
SET d.title = '01ESKEPEMRXHVQ1PN3SQWCE2Z8'
RETURN d
It is the same query than read but read is working but write never start the publisher
It emits nothing like there is no record !!!
but the exact query run into the browser and return a result
fun <T> write(query: String, action: Action<T>): Multi<T> =
Multi.createFrom().resource(driver::rxSession) { rxs ->
rxs.writeTransaction { tx ->
val rs = tx.run(query.trimIndent())
Multi.createFrom().publisher(rs.records()).map {
action(it)
}
}
}.withFinalizer(Consumer { it.uniClose() })
What do I miss ???
Regards
Robert