RedisGraph / redisgraph-go

A Golang client for redisgraph
https://redisgraph.io
BSD 3-Clause "New" or "Revised" License
132 stars 38 forks source link

How can I perform queries on an already existing graph #44

Closed moar55 closed 3 years ago

moar55 commented 3 years ago

How can I access the *graph struct without having to create a new one, but rather an existing one?

gkorland commented 3 years ago

Please check the docs https://oss.redislabs.com/redisgraph/commands/#graphquery.

query := `MATCH (p:person)-[v:visited]->(c:country)
           RETURN p.name, p.age, c.name`

    // result is a QueryResult struct containing the query's generated records and statistics.
    result, _ := graph.Query(query)
moar55 commented 3 years ago

okay thanks :)