Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix re-run for Cypher queries to target original DB #1061

Merged
merged 6 commits into from
Feb 17, 2020

Conversation

oskarhane
Copy link
Member

Changes made

Wrongfully we assumed that the target DB always should be the globally selected one. This was not a valid assumption and this PR fixes that.
Now a command action object can target a specific DB.

I refactored the arguments to our readTransaction, writeTransaction, and directTransaction to take an options object instead of just adding more args.

Unit tests for when using web workers and not + e2e tests included.

Reproduce the bug

  1. Run cypher query (q1) on db1 RETURN rand()
  2. Switch to a different db, db2: :use system
  3. Click "Re-run" on result frame for q1 from step 1.
  4. See it being executed on db2 rather than db1, which is unexpected behaviour.

Copy link
Contributor

@HerrEmil HerrEmil left a comment

Choose a reason for hiding this comment

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

Looks good to me 🎉

src/shared/services/bolt/bolt.js Outdated Show resolved Hide resolved
@oskarhane oskarhane merged commit 1518dc0 into neo4j:master Feb 17, 2020
@oskarhane oskarhane deleted the rerun-same-db branch February 17, 2020 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants