Skip to content

Instantly share code, notes, and snippets.

@ali-ince
Last active November 9, 2018 17:37
Show Gist options
  • Save ali-ince/c9e2362027b6c19753f91d432b800fe6 to your computer and use it in GitHub Desktop.
Save ali-ince/c9e2362027b6c19753f91d432b800fe6 to your computer and use it in GitHub Desktop.
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