Reset

reset – reset one or multiple session-level parameters

  1. reset module ;
  2. reset alias alias ;
  3. reset alias * ;
  4. reset global name ;

Description

This command allows resetting one or many configuration parameters of the current session.

Variations

reset module

Reset the default module name back to “default” for the current session.

For example, if a module foo contains type FooType, the following is how the set and reset commands can be used to alias it:

  1. # Set the default module to "foo" for the current session.
  2. set module foo;
  3. # This query is now equivalent to "select foo::FooType".
  4. select FooType;
  5. # Reset the default module for the current session.
  6. reset module;
  7. # This query will now produce an error.
  8. select FooType;

reset alias alias

Reset alias for the current session.

For example:

  1. # Alias the "std" module as "foo".
  2. set alias foo as module std;
  3. # Now "std::min()" can be called as "foo::min()" in
  4. # the current session.
  5. select foo::min({1});
  6. # Reset the alias.
  7. reset alias foo;
  8. # Now this query will error out, as there is no
  9. # module "foo".
  10. select foo::min({1});

reset alias *

Reset all aliases defined in the current session. This command affects aliases set with set alias and set module. The default module will be set to “default”.

Example:

  1. # Reset all custom aliases for the current session.
  2. reset alias *;

reset global name

Reset the global variable name to its default value or {} if the variable has no default value and is optional.

Examples

  1. reset module;
  2. reset alias foo;
  3. reset alias *;
  4. reset global current_user_id;

See also

Reference > EdgeQL > Set