Raxol.Core.StateManager.ETSStrategy (Raxol v2.6.0)

View Source

ETS-backed state operations for StateManager. All functions operate on a named ETS table.

Summary

Functions

Deletes all objects in the table.

Deletes a single key.

Deletes a nested key path.

Gets a single key; returns default when missing.

Returns the entire table as a map (excluding :version).

Gets a nested key path, trying tuple key first then parent map.

Returns the current version counter.

Increments the version counter.

Creates the ETS table if it does not exist.

Merges a map of key/value pairs into ETS.

Stores a single key/value pair.

Stores a nested key path, updating both tuple key and parent map.

Returns the table name from opts, defaulting to :raxol_unified_state.

Updates a key using an update function.

Functions

clear(opts)

Deletes all objects in the table.

delete(key, opts)

Deletes a single key.

delete_nested(keys, opts)

Deletes a nested key path.

get(key, default, opts)

Gets a single key; returns default when missing.

get_all(opts)

Returns the entire table as a map (excluding :version).

get_nested(keys, opts)

Gets a nested key path, trying tuple key first then parent map.

get_version(opts)

Returns the current version counter.

increment_version(opts)

Increments the version counter.

init_if_needed(opts)

Creates the ETS table if it does not exist.

merge(state1, state2, opts)

Merges a map of key/value pairs into ETS.

set(key, value, opts)

Stores a single key/value pair.

set_nested(keys, value, opts)

Stores a nested key path, updating both tuple key and parent map.

table_name_from_opts(opts)

Returns the table name from opts, defaulting to :raxol_unified_state.

update(key, update_fn, opts)

Updates a key using an update function.