RedisGraph.jl

RedisGraph Julia client
Author xyxel
Popularity
5 Stars
Updated Last
1 Year Ago
Started In
September 2019

RedisGraph Julia client

Usage example

using RedisGraph

db_conn = getdatabase()
g = Graph("TestGraph", db_conn)

node1 = Node("FirstSimpleNode", Dict("IntProp" => 1, "StringProp" => "node prop", "BoolProp" => true))
node2 = Node("SecondSimpleNode")
edge = Edge("SimpleEdge", node1, node2, Dict("IntProp" => 1, "StringProp" => "node prop", "BoolProp" => false))

addnode!(g, node1)
addnode!(g, node2)
addedge!(g, edge)
res = commit(g)

res = query(g, "MATCH (n1)-[e]->(n2) RETURN n1, e, n2")
println(res.results[1])

delete(g)

Prerequisites

julia >= 1.6.0
redisgraph >= 2.0

Setup

  1. redisgraph needs to be running.

You can install it manually
Or you can use docker container instead of. For example:

docker run -p 6379:6379 -it --rm redislabs/redisgraph
  1. add RedisGraph from the github repo
pkg> add https://github.com/xyxel/RedisGraph.jl

More information about package management: https://pkgdocs.julialang.org/v1/