PRIMARY KEYfollowed by the attributes that form the composite key enclosed in parentheses in the
DEFAULT default_valueoption overrides the built-in value.
(FROM User, To Book,...).
rev_name" is automatically created, with the FROM and TO vertices swapped. Moreover, whenever a new edge is created, a reverse edge is also created. The reverse edge will have the same attributes, and whenever the principal edge is updated, the corresponding reverse edge is also updated.
book_genreedges have no attributes. A
user_book_ratingedge symbolizes that a user has assigned a rating to a book. Therefore it includes an additional attribute
rating. In this case the
ratingattribute is defined to be an integer, but it could just as easily have been set to be a float attribute.
sequel_ofedge, it will also automatically create a
preceded_byedge, pointing in the opposite direction.
TYPEDEFstatements can be used outside of a query to define tuple types, GroupBy accumulator types, and heap accumulator types. Once defined, all graphs in the database have access to these user-defined types, and subqueries can be defined to return the user-defined types.
myTupleand a heap accumulator type
myHeap, so that the subquery
subquery1can return a value of
myHeaptype to its outer query
ALTER VERTEX User ADD INDEX user_country_index ON (country);
CREATE GRAPH ... AS(Beta)
CREATE GRAPH ... AScreates a tag-based graph of an existing graph. Tag-based graphs include vertices with specific tags from their base graphs, and have their own access control. Users can be granted roles on a tag-based graph and their roles will give them privileges that only apply to the resources in the tag-based graph.
ASclause after the
CREATE GRAPHcommand, and the definition of the graph must include at least one tagged vertex type. Edges are not tagged in a tag-based graph, but edges with either a source or a target outside of the tag-based graph are not visible to users of the tag-based graph.
&) to express vertices with multiple tags: