Electric.Shapes.WhereClause (electric v1.6.2)

Copy Markdown View Source

Summary

Functions

includes_record?(where_clause, record, subquery_member? \\ fn _, _ -> false end)

@spec includes_record?(Electric.Replication.Eval.Expr.t() | nil, map(), ([String.t()],
                                                                   term() ->
                                                                     boolean())) ::
  boolean()

includes_record_result(where_clause, record, subquery_member? \\ fn _, _ -> false end)

@spec includes_record_result(
  Electric.Replication.Eval.Expr.t() | nil,
  map(),
  ([String.t()], term() -> boolean())
) :: {:ok, boolean()} | :error

subquery_member_from_index(index, shape_handle)

@spec subquery_member_from_index(
  Electric.Shapes.Filter.Indexes.SubqueryIndex.t(),
  term()
) :: ([
        String.t()
      ],
      term() ->
        boolean())

Build a subquery_member? callback that queries the SubqueryIndex.

Used for filter-side exact verification: checks whether a specific shape currently contains a typed value for a canonical subquery ref.

subquery_member_from_refs(extra_refs)

@spec subquery_member_from_refs(map()) :: ([String.t()], term() -> boolean())