Skip to content

UNIQUE INDEX on nullable properties #584

@qomhmd

Description

@qomhmd

I think a unique index should not put a restriction on null values for nullable properties.

CREATE CLASS Concept EXTENDS V;
CREATE PROPERTY Concept.name STRING;
CREATE PROPERTY Concept.loinc STRING;
CREATE PROPERTY Concept.sctid STRING;
CREATE PROPERTY Concept.alias EMBEDDEDLIST STRING;
CREATE INDEX Concept.name UNIQUE;
CREATE INDEX Concept.loinc UNIQUE;
CREATE INDEX Concept.sctid UNIQUE;

CREATE VERTEX Concept set name = 'symptom', loinc = '75325-1'; 
CREATE VERTEX Concept set name = 'condition', loinc = '75323-6'; -- is not executed because of the previous record with sctid = null
CREATE VERTEX Concept set name = 'complaint', loinc = '75322-8'; -- is not executed because of the previous record with sctid = null
CREATE VERTEX Concept set name = 'age group', loinc = '46251-5'; -- is not executed because of the previous record with sctid = null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions