CREATE VERTEX vs INSERT


#1

It’s clear why you would use CREATE EDGE instead of just doing an INSERT on the edge class, but under what conditions would you use CREATE VERTEX vs. just doing an INSERT on the vertex class? CREATE VERTEX doesn’t seem to add any value, and it’s much more limited than INSERT for creating new records.


#2

Hi @eric24

That’s true, CREATE VERTEX does not do anything more than INSERT, it just checks that the target class is a vertex class. You can consider it as syntactic sugar and you can use the one you prefer

Thanks

Luigi


#3

That’s fine, but should (or does it already) CREATE VERTEX support the same overall syntax as INSERT? If CREATE VERTEX is mostly syntactic sugar, it shouldn’t be limited in it functionality. As documented, INSERT supports many more options vs. CREATE VERTEX.