Search
ctrl/
Ask AI
Light
Dark
System

Expression Aliases

This section describes the SDL declarations pertaining to expression aliases.

Declare a “UserAlias” that provides additional information for a “User” via a computed link “friend_of”:

Copy
alias UserAlias := User {
    # declare a computed link
    friend_of := User.<friends[is User]
};

Define a new alias corresponding to the more explicit DDL commands.

alias alias-name := alias-expr ;

alias alias-name "{"
    using alias-expr;
    [ annotation-declarations ]
"}" ;

This declaration defines a new alias with the following options:

alias-name

The name (optionally module-qualified) of an alias to be created.

alias-expr

The aliased expression. Can be any valid EdgeQL expression.

The valid SDL sub-declarations are listed below:

annotation-declarations

Set alias annotation to a given value.