Set​

set – set one or multiple session-level parameters

  1. set module module ;
  2. set alias alias as module module ;

Description​

This command allows altering the configuration of the current session.

Variations​

set module module

Set the default module for the current section to module.

For example, if a module foo contains type FooType, the following is how the type can be referred to:

  1. # Use the fully-qualified name.
  2. select foo::FooType;
  3. # Use the WITH clause to define the default module
  4. # for the query.
  5. with module foo select foo::FooType;
  6. # Set the default module for the current session ...
  7. set module foo;
  8. # ... and use an unqualified name.
  9. select FooType;

set alias alias as module module

Define alias for the module.

For example:

  1. # Use the fully-qualified name.
  2. select foo::FooType;
  3. # Use the WITH clause to define a custom alias
  4. # for the "foo" module.
  5. with bar as module foo
  6. select bar::FooType;
  7. # Define "bar" as an alias for the "foo" module for
  8. # the current session ...
  9. set alias bar as module foo;
  10. # ... and use "bar" instead of "foo".
  11. select bar::FooType;

Examples​

  1. set module foo;
  2. set alias foo AS module std;

See also

Reference > EdgeQL > Reset