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

ALTER TYPE

The alter type state­ment allows you add, rename and remove the attrib­utes of a user-defined-type.

ALTER TYPE identifier alter_expr
  • Attrib­utes 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 even­tu­ally spec­i­fied data val­ues 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>


EdgeType­De­f­i­n­i­tion

identifier (EdgeTypeParam [, EdgeTypeParam])
  • EdgeType­Param is an optional list of para­me­ters, please refer to the doc­u­men­ta­tion for the par­tic­u­lar EdgeType.


EdgeType­Param

object_type
[ DEFAULT = Value ]
[ SORTED = ASC | DESC ]
string_literal