Skip to content

update constraint syntax#184

Open
ColtraneNadler wants to merge 1 commit into
adam-cowley:masterfrom
ColtraneNadler:master
Open

update constraint syntax#184
ColtraneNadler wants to merge 1 commit into
adam-cowley:masterfrom
ColtraneNadler:master

Conversation

@ColtraneNadler
Copy link
Copy Markdown

Why?

Currently neode generates outdated CYPHER query syntax for unique constraints.
View issue here --> #183

What?

in /src/Schema.js update to correct CONSTRAINT syntax. Replace ON with FOR and ASSERT with REQUIRE

function UniqueConstraintCypher(label, property, mode = 'CREATE') {
    // return `${mode} CONSTRAINT ON (model:${label}) ASSERT model.${property} IS UNIQUE`;
    return `${mode} CONSTRAINT FOR (model:${label}) REQUIRE model.${property} IS UNIQUE`;
}

@ColtraneNadler
Copy link
Copy Markdown
Author

Bumping this

@joshamaju
Copy link
Copy Markdown

This hasn't been merged 😱, where do I go from here?

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.

2 participants