diff options
Diffstat (limited to 'lib/stdlib/doc/src/ets.xml')
-rw-r--r-- | lib/stdlib/doc/src/ets.xml | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml index ce116c50be..2aa05a599a 100644 --- a/lib/stdlib/doc/src/ets.xml +++ b/lib/stdlib/doc/src/ets.xml @@ -999,6 +999,32 @@ Error: fun containing local Erlang function calls </func> <func> + <name name="lookup_element" arity="4" since="OTP @OTP-18279@"/> + <fsummary>Return the <c>Pos</c>:th element of all objects with a + specified key in an ETS table, or <c>Default</c> if there is no such object.</fsummary> + <desc> + <p>For a table <c><anno>Table</anno></c> of type <c>set</c> or + <c>ordered_set</c>, the function returns the + <c><anno>Pos</anno></c>:th + element of the object with key <c><anno>Key</anno></c>.</p> + <p>For tables of type <c>bag</c> or <c>duplicate_bag</c>, + the functions returns a list with the <c><anno>Pos</anno></c>:th + element of every object with key <c><anno>Key</anno></c>.</p> + <p>If no object with key <c><anno>Key</anno></c> exists, the + function returns <c><anno>Default</anno></c>.</p> + <p>If <c><anno>Pos</anno></c> is larger than the size of + any tuple with a matching key, the function exits with + reason <c>badarg</c>.</p> + <p>The difference between <c>set</c>, <c>bag</c>, and + <c>duplicate_bag</c> on one hand, and <c>ordered_set</c> on + the other, regarding the fact that <c>ordered_set</c> + view keys as equal when they <em>compare equal</em> + whereas the other table types regard them equal only when + they <em>match</em>, holds for <c>lookup_element/4</c>.</p> + </desc> + </func> + + <func> <name name="match" arity="1" since=""/> <fsummary>Continues matching objects in an ETS table.</fsummary> <desc> @@ -1239,8 +1265,8 @@ ets:select(Table, MatchSpec),</code> means that to an <c>ordered_set</c> table, <c>integer()</c> <c>1</c> and <c>float()</c> <c>1.0</c> are regarded as equal. This also means that the - key used to lookup an element not necessarily - <em>matches</em> the key in the returned elements, if + key used to lookup an element does not necessarily + <em>match</em> the key in the returned elements, if <c>float()</c>'s and <c>integer()</c>'s are mixed in keys of a table.</p> </item> @@ -1361,7 +1387,7 @@ ets:select(Table, MatchSpec),</code> </note> <marker id="new_2_read_concurrency"></marker> </item> - <tag><c>{read_concurrency,boolean()}</c></tag> + <tag since="OTP R14B"><c>{read_concurrency,boolean()}</c></tag> <item> <p>Performance tuning. Defaults to <c>false</c>. When set to <c>true</c>, the table is optimized for concurrent read @@ -1386,7 +1412,7 @@ ets:select(Table, MatchSpec),</code> read bursts and large concurrent write bursts are common.</p> <marker id="new_2_decentralized_counters"></marker> </item> - <tag><c>{decentralized_counters,boolean()}</c></tag> + <tag since="OTP 23.0"><c>{decentralized_counters,boolean()}</c></tag> <item> <p> Performance tuning. Defaults to <c>true</c> for all @@ -1421,7 +1447,7 @@ ets:select(Table, MatchSpec),</code> </p> <marker id="new_2_compressed"></marker> </item> - <tag><c>compressed</c></tag> + <tag since="OTP R14B01"><c>compressed</c></tag> <item> <p>If this option is present, the table data is stored in a more compact format to consume less memory. However, it will make |