RedisGraph / redisgraph-go

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

No results returned from count query #9

Closed ChrisSandison closed 5 years ago

ChrisSandison commented 5 years ago

Example:

 query := fmt.Sprintf(
    "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'})",
  )

  // A service with an open, connected redisgraph
  results, _ := redisgraphsvc.Graph.Query(query)
  fmt.Println(results.Results) // Prints []

  query = fmt.Sprintf("MATCH (r:Rider) RETURN COUNT(r) AS riderCount")
  results, _ = suite.graphdriver.Graph.Query(query)
  fmt.Println(results.Results) // Prints [[riderCount] []]
ChrisSandison commented 5 years ago

It looks like some recent PR consideration has been given to this, but it is not included in the 1.0.0 release. Is there a timeline for this?

jeffreylovitz commented 5 years ago

@ChrisSandison This works as expected for me locally on the head of the master branch.

Can you confirm which version/commit you are running?

jeffreylovitz commented 5 years ago

@ChrisSandison Sorry, ignore that! Didn't realize this was a client issue.

ChrisSandison commented 5 years ago

Ah, got it. My go.mod was pointing to github.com/redislabs/redisgraph-go v1.0.0. I've moved it to github.com/redislabs/redisgraph-go v1.0.1-0.20190311052811-0d6a4659a1b5, and that seems to have resolved it. I will close the ticket. You might want to make a github release tag for this one though