Documentation/Graph Query Language
ALTER TYPE
The alter type statement allows you add, rename and remove the attributes of a user-defined-type.
ALTER TYPE identifier alter_expr
- Attributes can be added, dropped or renamed.
- Backward-Edges can be added or dropped.
- If you want to add an attribute ‘FName’ to the object ‘User’: ‘ALTER TYPE User ADD ATTRIBUTES (String FName)’
- ‘ALTER TYPE User DROP ATTRIBUTES (FName)’ removes the Attribute ‘FName’ from the object ‘User’ and all eventually specified data values in ‘User’-object instances)
alter_expr
ADD ATTRIBUTES ( attr_definition [, attr_definition] ) |
DROP ATTRIBUTES ( identifier_list ) |
ADD BACKWARDEDGES ( backwardedges_list ) |
DROP BACKWARDEDGES ( identifier_list ) |
RENAME ATTRIBUTE identifier TO identifier |
UNIQUE (identifier_list) |
DROP UNIQUE
attr_definition
object_type identifier
object_type
identifier |
EdgeTypeDefinition <identifier> |
LIST <identifier> |
LIST <EdgeTypeDefinition <identifier>>
backwardedges_list
id identifier |
<EdgeTypeDefinition>
EdgeTypeDefinition
identifier (EdgeTypeParam [, EdgeTypeParam])
- EdgeTypeParam is an optional list of parameters, please refer to the documentation for the particular EdgeType.
EdgeTypeParam
object_type
[ DEFAULT = Value ]
[ SORTED = ASC | DESC ]
string_literal
