Skip to content

Commit

Permalink
address deepsource comments
Browse files Browse the repository at this point in the history
  • Loading branch information
swilly22 committed May 30, 2022
1 parent 6941459 commit 69b85d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 5 additions & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,13 @@ func TestMultiLabelNode(t *testing.T) {
// create a multi label node
multiLabelNode := NodeNew([]string{"A","B"}, "n", nil)
graph.AddNode(multiLabelNode)
res, err := graph.Commit()
_, err = graph.Commit()
assert.Nil(t, err)

// fetch node
res, err = graph.Query("MATCH (n) RETURN n")
res, err := graph.Query("MATCH (n) RETURN n")
assert.Nil(t, err)

res.Next()
r := res.Record()
n := r.GetByIndex(0).(*Node)
Expand Down
2 changes: 1 addition & 1 deletion graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (g *Graph) CallProcedure(procedure string, yield []string, args ...interfac
}
q += fmt.Sprintf("%s)", strings.Join(tmp, ","))

if yield != nil && len(yield) > 0 {
if len(yield) > 0 {
q += fmt.Sprintf(" YIELD %s", strings.Join(yield, ","))
}

Expand Down
3 changes: 0 additions & 3 deletions query_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,10 @@ func (qr *QueryResult) parseRecords(raw_result_set []interface{}) {
case COLUMN_SCALAR:
s, _ := redis.Values(c, nil)
values[idx] = qr.parseScalar(s)
break
case COLUMN_NODE:
values[idx] = qr.parseNode(c)
break
case COLUMN_RELATION:
values[idx] = qr.parseEdge(c)
break
default:
panic("Unknown column type.")
}
Expand Down

0 comments on commit 69b85d1

Please sign in to comment.