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

Enable database switching with :use xx in multi-statement command #993

Merged

Conversation

oskarhane
Copy link
Member

@oskarhane oskarhane commented Nov 22, 2019

Added E2E tests

Make sure you enable multi-stament.

Test script:

  1. Create databases
    :use system
  2. CREATE DATABASE test1; CREATE DATABASE test2;
:use neo4j;
:param x => 1;
:unknown;
:use test1;
CREATE (:Test1);
:use test2;
CREATE (:Test2);

Check contents of the different databases. This is what the E2E test does.

@huboneo
Copy link
Contributor

huboneo commented Nov 25, 2019

@oskarhane maybe I am doing something wrong but this is not working:

:use foo

CREATE(n:foo) 
RETURN n

:use neo4j
MATCH (p:Person) RETURN p

:use foo
CREATE (z:bar) 

I get A database with that name not found.

@oskarhane
Copy link
Member Author

You need semi-colons to separate statements @huboneo

@huboneo
Copy link
Contributor

huboneo commented Nov 25, 2019

functional testing OK. Feel that I dont have enough context to understand the code changes. LGTM

@oskarhane oskarhane merged commit c80793d into neo4j:canary Nov 25, 2019
@oskarhane oskarhane deleted the canary-allow-use-in-multi-statement branch November 25, 2019 07:53
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