Skip to content

Commit

Permalink
fix: tinkerpop unit schema no define
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxxoo committed Dec 22, 2022
1 parent 02963d5 commit 62f9fed
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ public void initModernSchema(IdStrategy idStrategy) {
schema.propertyKey("ripple").ifNotExist().create();
schema.propertyKey("lop").ifNotExist().create();
schema.propertyKey("test").ifNotExist().create();
schema.propertyKey("p").ifNotExist().create();

switch (idStrategy) {
case AUTOMATIC:
Expand All @@ -475,8 +476,8 @@ public void initModernSchema(IdStrategy idStrategy) {
.nullableKeys("name")
.ifNotExist().create();
schema.vertexLabel(DEFAULT_VL)
.properties("name", "age")
.nullableKeys("name", "age")
.properties("name", "age", "p")
.nullableKeys("name", "age", "p")
.ifNotExist().create();
schema.vertexLabel("animal")
.properties("name", "age", "peter", "josh", "marko",
Expand All @@ -499,8 +500,8 @@ public void initModernSchema(IdStrategy idStrategy) {
.nullableKeys("name")
.useCustomizeStringId().ifNotExist().create();
schema.vertexLabel(DEFAULT_VL)
.properties("name", "age")
.nullableKeys("name", "age")
.properties("name", "age", "p")
.nullableKeys("name", "age", "p")
.useCustomizeStringId().ifNotExist().create();
schema.vertexLabel("animal")
.properties("name", "age")
Expand Down Expand Up @@ -557,6 +558,8 @@ public void initModernSchema(IdStrategy idStrategy) {
.range().ifNotExist().create();
schema.indexLabel("personByNameAge").onV("person").by("name", "age")
.ifNotExist().create();
schema.indexLabel("vertexByP").onV("vertex").by("p")
.ifNotExist().create();
}

@Watched
Expand Down Expand Up @@ -659,6 +662,8 @@ private void initBasicPropertyKey() {
schema.propertyKey("f").asFloat().ifNotExist().create();
schema.propertyKey("i").asInt().ifNotExist().create();
schema.propertyKey("l").asLong().ifNotExist().create();
schema.propertyKey("p").ifNotExist().create();
schema.propertyKey("k").ifNotExist().create();
schema.propertyKey("here").ifNotExist().create();
schema.propertyKey("to-change").ifNotExist().create();
schema.propertyKey("to-remove").ifNotExist().create();
Expand Down Expand Up @@ -704,7 +709,7 @@ private void initBasicVertexLabelV(IdStrategy idStrategy,
"favoriteColor", "aKey", "age", "boolean",
"float", "double", "string", "integer",
"long", "myId", "location", "x", "y", "s",
"n", "d", "f", "i", "l", "to-change",
"n", "d", "f", "i", "l", "p", "k", "to-change",
"to-remove", "to-keep", "old", "new",
"gremlin.partitionGraphStrategy.partition",
"color", "blah")
Expand All @@ -714,7 +719,7 @@ private void initBasicVertexLabelV(IdStrategy idStrategy,
"favoriteColor", "aKey", "age", "boolean",
"float", "double", "string", "integer",
"long", "myId", "location", "x", "y", "s",
"n", "d", "f", "i", "l", "to-change",
"n", "d", "f", "i", "l", "p", "k", "to-change",
"to-remove", "to-keep", "old", "new",
"gremlin.partitionGraphStrategy.partition",
"color", "blah")
Expand All @@ -729,7 +734,7 @@ private void initBasicVertexLabelV(IdStrategy idStrategy,
"favoriteColor", "aKey", "age", "boolean",
"float", "double", "string", "integer",
"long", "myId", "location", "x", "y", "s",
"n", "d", "f", "i", "l", "to-change",
"n", "d", "f", "i", "l", "p", "k", "to-change",
"to-remove", "to-keep", "old", "new",
"gremlin.partitionGraphStrategy.partition",
"color", "blah")
Expand All @@ -739,7 +744,7 @@ private void initBasicVertexLabelV(IdStrategy idStrategy,
"favoriteColor", "aKey", "age", "boolean",
"float", "double", "string", "integer",
"long", "myId", "location", "x", "y", "s",
"n", "d", "f", "i", "l", "to-change",
"n", "d", "f", "i", "l", "p", "k", "to-change",
"to-remove", "to-keep", "old", "new",
"gremlin.partitionGraphStrategy.partition",
"color", "blah")
Expand All @@ -754,6 +759,10 @@ private void initBasicVertexLabelV(IdStrategy idStrategy,
.ifNotExist().create();
schema.indexLabel("defaultVLByName").onV(defaultVL).by("name")
.ifNotExist().create();
schema.indexLabel("defaultVLBySome").onV(defaultVL).by("some")
.ifNotExist().create();
schema.indexLabel("defaultVLByK").onV(defaultVL).by("k")
.ifNotExist().create();
}

@Watched
Expand Down

0 comments on commit 62f9fed

Please sign in to comment.