Gel.Client.State (Gel v0.9.0)
View SourceState for the client is an execution context that affects the execution of EdgeQL commands in different ways:
- default module.
- module aliases.
- session config.
- global values.
The most convenient way to work with the state is to use the Gel API to change a required part of
the state.
See Gel.with_client_state/2, Gel.with_default_module/2,
Gel.with_module_aliases/2/Gel.without_module_aliases/2,
Gel.with_config/2/Gel.without_config/2 and
Gel.with_globals/2/Gel.without_globals/2 for more information.
Summary
Types
Config to be passed to Gel.with_config/2.
Keys that Gel accepts for changing client behaviour configuration.
State for the client is an execution context that affects the execution of EdgeQL commands.
Functions
Returns an Gel.Client.State with adjusted session config.
Returns an Gel.Client.State with adjusted default module.
Returns an Gel.Client.State with adjusted global values.
Returns an Gel.Client.State with adjusted module aliases.
Returns an Gel.Client.State without specified session config.
Returns an Gel.Client.State without specified globals.
Returns an Gel.Client.State without specified module aliases.
Types
@type config() :: %{required(config_key()) => term()} | [{config_key(), term()}]
Config to be passed to Gel.with_config/2.
@type config_key() ::
:allow_user_specified_id
| :session_idle_timeout
| :session_idle_transaction_timeout
| :query_execution_timeout
Keys that Gel accepts for changing client behaviour configuration.
The meaning and acceptable values can be found in the docs.
@opaque t()
State for the client is an execution context that affects the execution of EdgeQL commands.
Functions
Returns an Gel.Client.State with adjusted session config.
This is equivalent to using the configure session set command.
Returns an Gel.Client.State with adjusted default module.
This is equivalent to using the set module command,
or using the reset module command when giving nil.
Returns an Gel.Client.State with adjusted global values.
This is equivalent to using the set global command.
Returns an Gel.Client.State with adjusted module aliases.
This is equivalent to using the set alias command.
@spec without_config(t(), [config_key()]) :: t()
Returns an Gel.Client.State without specified session config.
This is equivalent to using the configure session reset command.
Returns an Gel.Client.State without specified globals.
This is equivalent to using the reset global command.
Returns an Gel.Client.State without specified module aliases.
This is equivalent to using the reset alias command.