Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mvid
Copy link
Contributor

@mvid mvid commented Jan 18, 2020

No description provided.

@mvid mvid requested a review from dhui January 18, 2020 00:33
@mvid
Copy link
Contributor Author

mvid commented Jan 18, 2020

Turns out that there were unreported errors while running, and neo4j.Collect should make them visible and actionable. Also fixing tests that fail now that the errors are visible

@coveralls
Copy link

coveralls commented Jan 18, 2020

Pull Request Test Coverage Report for Build 636

  • 7 of 9 (77.78%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.007%) to 51.984%

Changes Missing Coverage Covered Lines Changed/Added Lines %
database/neo4j/neo4j.go 7 9 77.78%
Files with Coverage Reduction New Missed Lines %
database/neo4j/neo4j.go 2 69.59%
Totals Coverage Status
Change from base Build 633: -0.007%
Covered Lines: 2450
Relevant Lines: 4713

💛 - Coveralls

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use neo4j.Collect() instead of session.Run() directly?

@mvid
Copy link
Contributor Author

mvid commented Jan 18, 2020

@dhui because of this issue:
neo4j/neo4j-go-driver#71

Turns out that session.Run doesn't return an error if the query fails, nor does the result, until the result is "consumed". neo4j.Collect is a utility function that runs and consumers, and returns the errors and results directly

Copy link
Member

@dhui dhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, just one thing

go.mod Outdated
github.com/neo4j-drivers/gobolt v1.7.4 // indirect
github.com/neo4j/neo4j-go-driver v1.7.4
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/common v0.2.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run go mod tidy. This line should go away

@dhui dhui merged commit 4ff83b9 into golang-migrate:master Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants