redux icon indicating copy to clipboard operation
redux copied to clipboard

Redisgraph support?

Open obkhan opened this issue 4 years ago • 1 comments

Could this library in current form execute graph queries?

https://oss.redislabs.com/redisgraph/

obkhan avatar Feb 26 '21 22:02 obkhan

Not natively, but one could build native support easily on top of the primitives that redux provides:

cmd <- list("GRAPH.QUERY", "MotoGP",
            "CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}), (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}), (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})")

cl <- redux::hiredis()
cl$command(cmd)
[[1]]
[[1]][[1]]
[1] "Nodes created: 6"

[[1]][[2]]
[1] "Properties set: 6"

[[1]][[3]]
[1] "Relationships created: 3"

[[1]][[4]]
[1] "Cached execution: 1"

[[1]][[5]]
[1] "Query internal execution time: 1.319545 milliseconds"

I think that direct support is out of scope for this package, but would be nice in a companion package if someone felt motivated to write it

richfitz avatar Feb 27 '21 18:02 richfitz