Light
Dark
System
v4latest
v5dev
v4latest
v3
v2
v1

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.

Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.