View Source EdgeDB.Client.State (EdgeDB v0.7.0)
State 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 EdgeDB
API to change a required part of
the state.
See EdgeDB.with_client_state/2
, EdgeDB.with_default_module/2
,
EdgeDB.with_module_aliases/2
/EdgeDB.without_module_aliases/2
,
EdgeDB.with_config/2
/EdgeDB.without_config/2
and
EdgeDB.with_globals/2
/EdgeDB.without_globals/2
for more information.
Summary
Types
Config to be passed to EdgeDB.with_config/2
.
Keys that EdgeDB accepts for changing client behaviour configuration.
State for the client is an execution context that affects the execution of EdgeQL commands.
Functions
Returns an EdgeDB.Client.State
with adjusted session config.
Returns an EdgeDB.Client.State
with adjusted default module.
Returns an EdgeDB.Client.State
with adjusted global values.
Returns an EdgeDB.Client.State
with adjusted module aliases.
Returns an EdgeDB.Client.State
without specified session config.
Returns an EdgeDB.Client.State
without specified globals.
Returns an EdgeDB.Client.State
without specified module aliases.
Types
@type config() :: %{required(config_key()) => term()} | [{config_key(), term()}]
Config to be passed to EdgeDB.with_config/2
.
@type config_key() ::
:allow_user_specified_id
| :session_idle_timeout
| :session_idle_transaction_timeout
| :query_execution_timeout
Keys that EdgeDB 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 EdgeDB.Client.State
with adjusted session config.
This is equivalent to using the configure session set
command.
Returns an EdgeDB.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 EdgeDB.Client.State
with adjusted global values.
This is equivalent to using the set global
command.
Returns an EdgeDB.Client.State
with adjusted module aliases.
This is equivalent to using the set alias
command.
@spec without_config(t(), [config_key()]) :: t()
Returns an EdgeDB.Client.State
without specified session config.
This is equivalent to using the configure session reset
command.
Returns an EdgeDB.Client.State
without specified globals.
This is equivalent to using the reset global
command.
Returns an EdgeDB.Client.State
without specified module aliases.
This is equivalent to using the reset alias
command.