# `Electric.Replication.Eval.Runner`
[🔗](https://github.com/electric-sql/electric/tree/%40core/sync-service%401.6.2/packages/sync-service/lib/electric/replication/eval/runner.ex#L1)

# `execute`

```elixir
@spec execute(Electric.Replication.Eval.Expr.t(), map(), keyword()) ::
  {:ok, term()}
  | {:error,
     {%Electric.Replication.Eval.Parser.Func{
        args: term(),
        immutable?: term(),
        implementation: term(),
        location: term(),
        map_over_array_in_pos: term(),
        name: term(),
        strict?: term(),
        type: term(),
        variadic_arg: term()
      }, [term()]}}
```

Run a PG function parsed by `Electric.Replication.Eval.Parser` based on the inputs

# `execute_for_record`

# `record_to_ref_values`

```elixir
@spec record_to_ref_values(
  Electric.Replication.Eval.Expr.used_refs(),
  map(),
  Electric.Replication.Eval.Env.t()
) :: {:ok, map()} | :error
```

Generate a ref values object based on the record and a given table name

## Examples

    iex> used_refs = %{["id"] => :int8, ["created_at"] => :timestamp}
    iex> record_to_ref_values(used_refs, %{"id" => "80", "created_at" => "2020-01-01T11:00:00Z"})
    %{
      ["id"] => 80,
      ["created_at"] => ~N[2020-01-01 11:00:00]
    }

---

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