Last active
November 9, 2018 17:37
-
-
Save ali-ince/c9e2362027b6c19753f91d432b800fe6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func executeQuery(tx neo4j.Transaction) (interface{}, error) { | |
var ( | |
counter int | |
result neo4j.Result | |
err error | |
) | |
if result, err = tx.Run(query, nil); err != nil { | |
return nil, err | |
} | |
processHeader(result) | |
for result.Next() { | |
processRecord(result.Record()) | |
counter++ | |
} | |
if err = result.Err(); err != nil { | |
return nil, err | |
} | |
return counter, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment