Skip to content

Instantly share code, notes, and snippets.

@cj2001
Created February 9, 2021 23:44
Show Gist options
  • Save cj2001/b921d32cc843b8e4412e56936d4abd1f to your computer and use it in GitHub Desktop.
Save cj2001/b921d32cc843b8e4412e56936d4abd1f to your computer and use it in GitHub Desktop.
Create arXiv constraints
conn.query('CREATE CONSTRAINT papers IF NOT EXISTS ON (p:Paper) ASSERT p.id IS UNIQUE')
conn.query('CREATE CONSTRAINT authors IF NOT EXISTS ON (a:Author) ASSERT a.name IS UNIQUE')
conn.query('CREATE CONSTRAINT categories IF NOT EXISTS ON (c:Category) ASSERT c.category IS UNIQUE')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment