Doc­u­men­ta­tion/Graph Query Language

CREATE TYPES

This state­ment cre­ates mul­ti­ple user-defined types at once. This might be nec­es­sary if you have cir­cu­lar depen­den­cies within your type definitions.

CREATE TYPES bulk_type_list_member [, bulk_type_list_member]


bulk_type_list_member

identifier
[ EXTENDS identifier ]
[ ATTRIBUTES ( attr_definition ) ]
[ BACKWARDEDGES ( backwardedges_list ) ]
[ UNIQUE ( identifier_list ) ]
  • The key­word ‘EXTENDS’ fol­lowed by any iden­ti­fier can be used to inherit the base type def­i­n­i­tion from another type (called supertype).
  • Addi­tional attrib­utes can be added using the ‘ATTRIBUTES’ key­word fol­lowed by a brack­eted list of attribute definitions.
  • Back­wardegeds can be added using the ‘BACKWARDEDGES’ key­word fol­lowed by a brack­eted list of backwardedges.
  • The key­word ‘UNIQUE’ fol­lowed by a brack­eted list of attrib­utes will define a unique­ness con­straint. Hav­ing a ‘UNIQUE ( Name, Age )’ con­straint will deny an ‘INSERT’ query if the com­bi­na­tion of the attrib­utes ‘Name’ and ‘Age’ is already present within the database.