neo4j-partners / hands-on-lab-neo4j-and-vertex-ai

Hands on Lab for Neo4j and Vertex AI
Apache License 2.0
93 stars 45 forks source link

Lab 3 - fix syntax errors due to neo4j v 5 #16

Closed Samyouell closed 1 year ago

Samyouell commented 1 year ago

old syntax. CREATE CONSTRAINT IF NOT EXISTS ON (p:Company) ASSERT (p.cusip) IS NODE KEY; CREATE CONSTRAINT IF NOT EXISTS ON (p:Manager) ASSERT (p.filingManager) IS NODE KEY; CREATE CONSTRAINT IF NOT EXISTS ON (p:Holding) ASSERT (p.filingManager, p.cusip, p.reportCalendarOrQuarter) IS NODE KEY;

replace it with the new syntax CREATE CONSTRAINT IF NOT EXISTS FOR (p:Company) REQUIRE (p.cusip) IS NODE KEY; CREATE CONSTRAINT IF NOT EXISTS FOR (p:Manager) REQUIRE (p.filingManager) IS NODE KEY; CREATE CONSTRAINT IF NOT EXISTS FOR (p:Holding) REQUIRE (p.filingManager, p.cusip, p.reportCalendarOrQuarter) IS NODE KEY;

gogitguhan commented 1 year ago

Fixed and tested.