An ETS match pattern is a tuple-shaped descriptor for selecting rows by position. The atom :_ leaves a field unconstrained, so {:_, "Dentist"} selects every row whose second element is "Dentist". Unlike ordinary Elixir pattern matching, the tuple is interpreted by :ets.match_object/2. section 10.3.3
Finding appointments by type
With rows such as {~D[2023-05-24], "Dentist"} and {~D[2023-05-30], "Dentist"}, calling :ets.match_object(todo_list, {:_, "Dentist"}) returns both appointments, regardless of date. The related :ets.match_delete/2 operation removes multiple matching objects in one statement. section 10.3.3
iex(6)> :ets.match_object(todo_list, {:_, "Dentist"})
[{~D[2023-05-24], "Dentist"}, {~D[2023-05-30], "Dentist"}]
Inspect the runnable ETS query that matches all dentist appointments across dates. section 10.3.3
