@@ -1304,12 +1304,12 @@ defmodule Registry do
1304
1304
iex> Registry.select(Registry.SelectAllTest, [{{:"$1", :"$2", :"$3"}, [], [{{:"$1", :"$2", :"$3"}}]}]) |> Enum.sort()
1305
1305
[{"hello", self(), :value}, {"world", self(), :value}]
1306
1306
1307
- Get all keys in the registry :
1307
+ If you want to get keys, you can pass a separate selector :
1308
1308
1309
- iex> Registry.start_link(keys: :unique, name: Registry.SelectAllTest )
1310
- iex> {:ok, _} = Registry.register(Registry.SelectAllTest , "hello", :value)
1311
- iex> {:ok, _} = Registry.register(Registry.SelectAllTest , "world", :value)
1312
- iex> Registry.select(Registry.SelectAllTest , [{{:"$1", :_, :_}, [], [:"$1"]}]) |> Enum.sort()
1309
+ iex> Registry.start_link(keys: :unique, name: Registry.SelectKeysTest )
1310
+ iex> {:ok, _} = Registry.register(Registry.SelectKeysTest , "hello", :value)
1311
+ iex> {:ok, _} = Registry.register(Registry.SelectKeysTest , "world", :value)
1312
+ iex> Registry.select(Registry.SelectKeysTest , [{{:"$1", :_, :_}, [], [:"$1"]}]) |> Enum.sort()
1313
1313
["hello", "world"]
1314
1314
1315
1315
"""
0 commit comments