Electric.Shapes.Filter.Indexes.EqualityIndex (electric v1.4.13)
View SourceEfficiently finds shapes that are affected by a change when the shape's where clause has field = const in it.
Data is stored in the Filter's eq_index_table ETS table with keys of the form:
{condition_id, field, value} -> {type, next_condition_id}
The type is stored to know how to parse values from records. The next_condition_id points to a WhereCondition for the remaining conditions of the where clause.
Additionally, the field type is cached at:
{:type, condition_id, field} -> type
This enables O(1) type lookup for parsing record values.