PRIMARY KEY
syntax, you will not be able to operate on the graph with that vertex type or the global schema in GraphStudio. PRIMARY KEY
followed by the attributes that form the composite key enclosed in parentheses in the CREATE VERTEX
command.DEFAULT default_value
option 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.user_occupation
and book_genre
edges have no attributes. A user_book_rating
edge symbolizes that a user has assigned a rating to a book. Therefore it includes an additional attribute rating
. In this case the rating
attribute is defined to be an integer, but it could just as easily have been set to be a float attribute. sequel_of
edge, it will also automatically create a preceded_by
edge, pointing in the opposite direction.TYPEDEF
TYPEDEF
statements 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. myTuple
and a heap accumulator type myHeap
, so that the subquery subquery1
can return a value of myHeap
type to its outer query query1
.ALTER VERTEX User ADD INDEX user_country_index ON (country);
CREATE GRAPH ... AS
(Beta)CREATE GRAPH ... AS
creates 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. AS
clause after the CREATE GRAPH
command, 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:DROP ALL
, along with all DROP operations, is nonreversible.