Documentation/Graph Query Language
CREATE TYPES
This statement creates multiple user-defined types at once. This might be necessary if you have circular dependencies 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 keyword ‘EXTENDS’ followed by any identifier can be used to inherit the base type definition from another type (called supertype).
- Additional attributes can be added using the ‘ATTRIBUTES’ keyword followed by a bracketed list of attribute definitions.
- Backwardegeds can be added using the ‘BACKWARDEDGES’ keyword followed by a bracketed list of backwardedges.
- The keyword ‘UNIQUE’ followed by a bracketed list of attributes will define a uniqueness constraint. Having a ‘UNIQUE ( Name, Age )’ constraint will deny an ‘INSERT’ query if the combination of the attributes ‘Name’ and ‘Age’ is already present within the database.
