-
Notifications
You must be signed in to change notification settings - Fork 467
Open
Labels
enhancementNew requestNew request
Description
Hello, it would be great if we could use unique keys in nodes and edges. in Neo4j it's called Node Key and it can be used like these:
CREATE CONSTRAINT constraint_name ON (n:Person) ASSERT (n.firstname) IS NODE KEYCREATE CONSTRAINT constraint_name ON (n:Person) ASSERT (n.firstname, n.surname) IS NODE KEYCREATE CONSTRAINT constraint_name IF NOT EXISTS ON (n:Person) ASSERT (n.firstname, n.surname) IS NODE KEYCREATE CONSTRAINT constraint_with_provider ON (n:Label) ASSERT (n.prop1) IS NODE KEY OPTIONS {indexProvider: 'native-btree-1.0'}DROP CONSTRAINT constraint_nameDROP CONSTRAINT missing_constraint_name IF EXISTS
I've tried to use Postgres queries but since the properties column type is not json/jsonb I got error:
postgres=# CREATE UNIQUE INDEX person_name_idx ON mygraph.person( (properties->>'name') ) ;
ERROR: operator does not exist: ag_catalog.agtype ->> unknown
LINE 1: ...INDEX person_name_idx ON mygraph.person( (properties->>'name')...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.pdpotter, shiro, winkelband, Dzordzu, milosgajdos and 2 morerudglazkovalex
Metadata
Metadata
Assignees
Labels
enhancementNew requestNew request
Type
Projects
Status
No status
Status
No status