Closed augustearth closed 3 years ago
Propose the following:
// to create a vertex
Clinical.VX.PATIENT
.withProperty(Core.PX.NAME, 'david')
.create(graph, g)
// to get or create the existing singleton
Clinical.VX.PATIENT
.withProperty(Core.PX.NAME, 'david'))
.singleton()
.get(graph, g)
// to get the existing singleton
// if it has not been created, return null
Clinical.VX.PATIENT
.withProperty(Core.PX.NAME, 'david'))
.singleton()
.getExisting(graph, g)
// check if the singleton exists
Clinical.VX.PATIENT
.withProperty(Core.PX.NAME, 'david'))
.singleton()
.exists(graph, g)
This is done. Pretty sure.
Harmonize VertexDefTrait and EdgeDefTrait.