()
| 12 | ) |
| 13 | |
| 14 | func ExampleGraphNew() { |
| 15 | conn, _ := redis.Dial("tcp", "0.0.0.0:6379") |
| 16 | |
| 17 | graph := redisgraph.GraphNew("social", conn) |
| 18 | |
| 19 | q := "CREATE (w:WorkPlace {name:'RedisLabs'}) RETURN w" |
| 20 | res, _ := graph.Query(q) |
| 21 | |
| 22 | res.Next() |
| 23 | r := res.Record() |
| 24 | w := r.GetByIndex(0).(*redisgraph.Node) |
| 25 | fmt.Println(w.Label) |
| 26 | // Output: WorkPlace |
| 27 | } |
| 28 | |
| 29 | func ExampleGraphNew_pool() { |
| 30 | host := "localhost:6379" |
nothing calls this directly
no test coverage detected