# `Electric.Shapes.Consumer.Materializer`
[🔗](https://github.com/electric-sql/electric/tree/%40core/sync-service%401.6.2/packages/sync-service/lib/electric/shapes/consumer/materializer.ex#L1)

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `delete_link_values`

```elixir
@spec delete_link_values(Electric.stack_id(), Electric.shape_handle()) :: :ok
```

Removes the cached link values for `shape_handle` from the shared ETS table.
Safe to call even if the table does not exist (e.g. after a stack shutdown).

# `get_all_as_refs`

# `get_link_values`

Returns the current set of materialized link values for a shape.
Checks the shared ETS cache first (written after each committed transaction);
falls back to a synchronous GenServer call if the cache has no entry yet.

# `get_stream_up_to_offset`

Get a stream of log entries from storage, bounded by the subscribed offset.

The subscribed_offset is the Consumer's latest_offset at the time of subscription.
We only read up to this offset to avoid duplicates - any changes after this offset
will be delivered via new_changes messages from the Consumer.

# `handle_continue`

# `init`

# `init_link_values_table`

```elixir
@spec init_link_values_table(stack_id :: term()) :: :ets.table() | :undefined
```

Creates the per-stack ETS table that caches link values for all materializers
in a stack. Called by `ConsumerRegistry` during stack initialization. Idempotent —
safe to call when the table already exists.

# `link_values_table_name`

```elixir
@spec link_values_table_name(Electric.stack_id()) :: atom()
```

# `name`

# `name`

# `new_changes`

```elixir
@spec new_changes(
  map(),
  [Electric.Replication.Changes.change()]
  | {Electric.Replication.LogOffset.t(), Electric.Replication.LogOffset.t()},
  keyword()
) :: :ok
```

# `start_link`

# `subscribe`

# `subscribe`

# `wait_until_ready`

# `whereis`

# `whereis`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
