Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 1161 lines (696 sloc) 31.764 kb
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1
2
0aef2af Joseph Wayne Norton Update docs
authored
3 # Module gen_ets_ns #
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
4 * [Data Types](#types)
5 * [Function Index](#index)
6 * [Function Details](#functions)
7
8 __This module defines the `gen_ets_ns` behaviour.__
9 <br></br>
7abce11 Joseph Wayne Norton Refresh edocs
authored
10 Required callback functions: `open/2`, `destroy/2`, `repair/2`, `delete/1`, `delete/2`, `delete_all_objects/1`, `first/1`, `first_iter/1`, `info_memory/1`, `info_size/1`, `insert/2`, `insert_new/2`, `last/1`, `last_iter/1`, `lookup/2`, `lookup_element/3`, `member/2`, `next/2`, `next_iter/2`, `prev/2`, `prev_iter/2`, `notify/4`, `first/2`, `first_iter/2`, `last/2`, `last_iter/2`, `next/3`, `next_iter/3`, `prev/3`, `prev_iter/3`.
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
11
0aef2af Joseph Wayne Norton Update docs
authored
12 <a name="types"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
13
0aef2af Joseph Wayne Norton Update docs
authored
14 ## Data Types ##
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
15
16
17
18
0aef2af Joseph Wayne Norton Update docs
authored
19 ### <a name="type-cont">cont()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
20
21
22 __abstract datatype__: `cont()`
23
24
25
0aef2af Joseph Wayne Norton Update docs
authored
26
27 ### <a name="type-gen_ns">gen_ns()</a> ###
28
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
29
30
0aef2af Joseph Wayne Norton Update docs
authored
31 <pre><code>
32 gen_ns() = atom()
33 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
34
35
36
37
38
0aef2af Joseph Wayne Norton Update docs
authored
39 ### <a name="type-gen_tab">gen_tab()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
40
41
42
0aef2af Joseph Wayne Norton Update docs
authored
43 <pre><code>
44 gen_tab() = <a href="#type-name">name()</a> | <a href="#type-gen_tid">gen_tid()</a>
45 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
46
47
48
49
50
0aef2af Joseph Wayne Norton Update docs
authored
51 ### <a name="type-gen_tid">gen_tid()</a> ###
52
53
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
54 __abstract datatype__: `gen_tid()`
55
56
57
0aef2af Joseph Wayne Norton Update docs
authored
58
59 ### <a name="type-impl_opt">impl_opt()</a> ###
60
61
62
63 <pre><code>
64 impl_opt() = term()
65 </code></pre>
66
67
68
69
70
71 ### <a name="type-impl_opts">impl_opts()</a> ###
72
73
74
75 <pre><code>
76 impl_opts() = [<a href="#type-impl_opt">impl_opt()</a>]
77 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
78
79
80
81
82
0aef2af Joseph Wayne Norton Update docs
authored
83 ### <a name="type-item">item()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
84
85
86
0aef2af Joseph Wayne Norton Update docs
authored
87 <pre><code>
88 item() = owner | name | named_table | type | keypos | protection | compressed | async | memory | size
89 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
90
91
92
93
94
0aef2af Joseph Wayne Norton Update docs
authored
95 ### <a name="type-key">key()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
96
97
98
0aef2af Joseph Wayne Norton Update docs
authored
99 <pre><code>
100 key() = term()
101 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
102
103
104
105
106
0aef2af Joseph Wayne Norton Update docs
authored
107 ### <a name="type-limit">limit()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
108
109
110
0aef2af Joseph Wayne Norton Update docs
authored
111 <pre><code>
112 limit() = pos_integer()
113 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
114
115
116
117
118
0aef2af Joseph Wayne Norton Update docs
authored
119 ### <a name="type-match">match()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
120
121
122
0aef2af Joseph Wayne Norton Update docs
authored
123 <pre><code>
124 match() = term()
125 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
126
127
128
129
130
0aef2af Joseph Wayne Norton Update docs
authored
131 ### <a name="type-match_pattern">match_pattern()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
132
133
0aef2af Joseph Wayne Norton Update docs
authored
134
135 <pre><code>
136 match_pattern() = atom() | tuple()
137 </code></pre>
138
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
139
140
141
142
143 <pre><code>ets:match_pattern() is not exported!</code></pre>
144
145
146
147
148
0aef2af Joseph Wayne Norton Update docs
authored
149 ### <a name="type-match_spec">match_spec()</a> ###
150
151
152
153 <pre><code>
154 match_spec() = <a href="ets.md#type-match_spec">ets:match_spec()</a>
155 </code></pre>
156
157
158
159
160
161 ### <a name="type-name">name()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
162
163
164
0aef2af Joseph Wayne Norton Update docs
authored
165 <pre><code>
166 name() = term()
167 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
168
169
170
171
172
0aef2af Joseph Wayne Norton Update docs
authored
173 ### <a name="type-object">object()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
174
175
176
0aef2af Joseph Wayne Norton Update docs
authored
177 <pre><code>
178 object() = tuple()
179 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
180
181
182
183
184
0aef2af Joseph Wayne Norton Update docs
authored
185 ### <a name="type-opt">opt()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
186
187
188
0aef2af Joseph Wayne Norton Update docs
authored
189 <pre><code>
190 opt() = set | ordered_set | named_table | {keypos, pos_integer()} | public | protected | private | compressed | async
191 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
192
193
194
195
196
0aef2af Joseph Wayne Norton Update docs
authored
197 ### <a name="type-opts">opts()</a> ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
198
199
200
0aef2af Joseph Wayne Norton Update docs
authored
201 <pre><code>
202 opts() = [<a href="#type-opt">opt()</a> | {impl, {module(), <a href="#type-impl_opts">impl_opts()</a>}}]
203 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
204
205
206
207
208
0aef2af Joseph Wayne Norton Update docs
authored
209 ### <a name="type-pos">pos()</a> ###
210
211
212
213 <pre><code>
214 pos() = pos_integer()
215 </code></pre>
216
217
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
218 <a name="index"></a>
219
0aef2af Joseph Wayne Norton Update docs
authored
220 ## Function Index ##
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
221
222
223 <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#all-1">all/1</a></td><td><p>Returns a list of all tables at the node.</p>.</td></tr><tr><td valign="top"><a href="#behaviour_info-1">behaviour_info/1</a></td><td></td></tr><tr><td valign="top"><a href="#delete-2">delete/2</a></td><td><p>Deletes the entire table <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#delete-3">delete/3</a></td><td><p>Deletes all objects with the key <code>Key</code> from the table <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#delete_all_objects-2">delete_all_objects/2</a></td><td><p>Delete all objects in the table <code>Tab</code>. The operation is
224 guaranteed to be atomic and isolated. This function only applies
225 to the <code>ets</code> implementation.</p>.</td></tr><tr><td valign="top"><a href="#destroy-3">destroy/3</a></td><td><p>Destroy the contents of the specified table.</p>.</td></tr><tr><td valign="top"><a href="#first-2">first/2</a></td><td><p>Returns the first key <code>Key</code> in the table <code>Tab</code>. If the table
226 is empty, <code><em>$end_of_table</em></code> will be returned.</p>.</td></tr><tr><td valign="top"><a href="#foldl-4">foldl/4</a></td><td><p>Fold from left to right over the elements of the table.</p>.</td></tr><tr><td valign="top"><a href="#foldr-4">foldr/4</a></td><td><p>Fold from right to left over the elements of the table.</p>.</td></tr><tr><td valign="top"><a href="#info-2">info/2</a></td><td><p>Returns information about the table <code>Tab</code> as a list of <code>{Item,
227 Value}</code> tuples.</p>.</td></tr><tr><td valign="top"><a href="#info-3">info/3</a></td><td><p>Returns the information associated with <code>Item</code> for the table <code>Tab</code>.</p>
228
229
230 <pre><code>Valid +Item+ options are:</code></pre>
231
232 <ul>
233 <li>
234 <p>
235 <code>owner</code>
236 </p>
237 </li>
238 <li>
239 <p>
240 <code>name</code>
241 </p>
242 </li>
243 <li>
244 <p>
245 <code>named_table</code> <em>only the ets implementation</em>
246 </p>
247 </li>
248 <li>
249 <p>
250 <code>type</code>
251 </p>
252 </li>
253 <li>
254 <p>
255 <code>keypos</code>
256 </p>
257 </li>
258 <li>
259 <p>
260 <code>protection</code>
261 </p>
262 </li>
263 <li>
264 <p>
265 <code>compressed</code>
266 </p>
267 </li>
268 <li>
269 <p>
270 <code>async</code> <em>only the drv implementation</em>
271 </p>
272 </li>
273 <li>
274 <p>
275 <code>memory</code> <em>only the ets implementation</em>
276 </p>
277 </li>
278 <li>
279 <p>
280 <code>size</code> <em>only the ets implementation</em>
281 </p>
282 </li>
283 </ul>.</td></tr><tr><td valign="top"><a href="#insert-3">insert/3</a></td><td><p>Inserts the object or all of the objects in the list
284 <code>ObjOrObjs</code> into the table <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#insert_new-3">insert_new/3</a></td><td><p>This function works exactly like <code>insert/2</code>, with the
285 exception that instead of overwriting objects with the same key, it
286 simply returns false. This function only applies to the <code>ets</code>
287 implementation.</p>.</td></tr><tr><td valign="top"><a href="#last-2">last/2</a></td><td><p>Returns the last key <code>Key</code> in the table <code>Tab</code>. If the table
288 is empty, <code><em>$end_of_table</em></code> will be returned.</p>.</td></tr><tr><td valign="top"><a href="#lookup-3">lookup/3</a></td><td><p>Returns a list of all objects with the key <code>Key</code> in the table
289 <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#lookup_element-4">lookup_element/4</a></td><td><p>Returns the <code>Pos</code>:th element of the object with the key <code>Key</code>
290 in the table <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#match-2">match/2</a></td><td><p>Continues a match started with <code>match/3</code>.</p>.</td></tr><tr><td valign="top"><a href="#match-3">match/3</a></td><td><p>Matches the objects in the table <code>Tab</code> against the pattern
291 <code>Pattern</code>.</p>.</td></tr><tr><td valign="top"><a href="#match-4">match/4</a></td><td><p>Matches the objects in the table <code>Tab</code> against the pattern
292 <code>Pattern</code> and returns a limited (<code>Limit</code>) number of matching
293 objects.</p>.</td></tr><tr><td valign="top"><a href="#match_delete-3">match_delete/3</a></td><td><p>Deletes all objects which match the pattern <code>Pattern</code> from the
294 table <code>Tab</code>.</p>.</td></tr><tr><td valign="top"><a href="#match_object-2">match_object/2</a></td><td><p>Continues a match started with <code>match_object/3</code>.</p>.</td></tr><tr><td valign="top"><a href="#match_object-3">match_object/3</a></td><td><p>Matches the objects in the table <code>Tab</code> against the pattern
295 <code>Pattern</code>.</p>.</td></tr><tr><td valign="top"><a href="#match_object-4">match_object/4</a></td><td><p>Matches the objects in the table <code>Tab</code> against the pattern
296 <code>Pattern</code> and returns a limited (<code>Limit</code>) number of matching
297 objects.</p>.</td></tr><tr><td valign="top"><a href="#member-3">member/3</a></td><td><p>Returns <code>true</code> if one or more elements in the table <code>Tab</code> has
298 the key <code>Key</code>, <code>false</code> otherwise.</p>.</td></tr><tr><td valign="top"><a href="#new-3">new/3</a></td><td><p>Creates a new table and returns a table identifier which can
299 be used in subsequent operations. The table identifier can be sent
300 to other processes so that a table can be shared between different
301 processes within a node.</p>
302
303
304 <pre><code>Valid GEN_ETS properties for +Options+ are:</code></pre>
305
306 <ul>
307 <li>
308 <p>
309 <code>set</code> The table is a set table - one key, one object, no order
310 among objects. This is the default table type.
311 </p>
312 </li>
313 <li>
314 <p>
315 <code>ordered_set</code> The table is an ordered_set table - one key, one
316 object, ordered in Erlang term order, which is the order implied
317 by the <code><</code> and <code>></code> operators.
318 </p>
319 </li>
320 <li>
321 <p>
322 <code>named_table</code> If this option is present, the name <code>Name</code> is
323 associated with the table identifier.
324 </p>
325 </li>
326 <li>
327 <p>
328 <code>{keypos,pos_integer()}</code> Specfies which element in the stored
329 tuples should be used as key. By default, it is the first
330 element, i.e. <code>Pos=1</code>.
331 </p>
332 </li>
333 <li>
334 <p>
335 <code>public</code> Any process may read or write to the table.
336 </p>
337 </li>
338 <li>
339 <p>
340 <code>protected</code> The owner process can read and write to the table.
341 Other processes can only read the table. This is the default
342 setting for the access rights.
343 </p>
344 </li>
345 <li>
346 <p>
347 <code>private</code> Only the owner process can read or write to the table.
348 </p>
349 </li>
350 <li>
351 <p>
352 <code>compressed</code> If this option is present, the table data will be
353 stored in a compressed format.
354 </p>
355 </li>
356 <li>
357 <p>
358 <code>async</code> If this option is present and supported by the
359 implementation, the emulator's async thread pool will be used
360 when accessing the table data.
361 </p>
362 </li>
363 <li>
364 <p>
d8943da Joseph Wayne Norton Refresh edocs
authored
365 <code>{impl, module(), impl_opts()}</code> The module that implements
366 GEN_ETS callback functions. Implementation specific options can be
367 given. The default is <code>{impl, gen_ets_impl_ets, []}</code>.
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
368 </p>
369 </li>
370 </ul>.</td></tr><tr><td valign="top"><a href="#next-3">next/3</a></td><td><p>Returns the next key <code>Key2</code>, following the key <code>Key1</code> in the
371 table <code>Tab</code>. If there is no next key, <code><em>$end_of_table</em></code> is
372 returned.</p>.</td></tr><tr><td valign="top"><a href="#prev-3">prev/3</a></td><td><p>Returns the previous key <code>Key2</code>, following the key <code>Key1</code> in
373 the table <code>Tab</code>. If there is no previous key, <code><em>$end_of_table</em></code> is
374 returned.</p>.</td></tr><tr><td valign="top"><a href="#repair-3">repair/3</a></td><td><p>If a table cannot be opened, you may attempt to call this
375 method to resurrect as much of the contents of the table as
376 possible. Some data may be lost, so be careful when calling this
377 function on a table that contains important information.</p>.</td></tr><tr><td valign="top"><a href="#select-2">select/2</a></td><td><p>Continues a select started with <code>select/3</code>.</p>.</td></tr><tr><td valign="top"><a href="#select-3">select/3</a></td><td><p>Matches the objects in the table <code>Tab</code> against the spec
378 <code>Spec</code>.</p>.</td></tr><tr><td valign="top"><a href="#select-4">select/4</a></td><td><p>Matches the objects in the table <code>Tab</code> against the spec <code>Spec</code>
379 and returns a limited (<code>Limit</code>) number of matching objects.</p>.</td></tr><tr><td valign="top"><a href="#select_count-3">select_count/3</a></td><td><p>Counts all objects which match the spec <code>Spec</code> from the
380 table <code>Tab</code> and returns the number matched.</p>.</td></tr><tr><td valign="top"><a href="#select_delete-3">select_delete/3</a></td><td><p>Deletes all objects which match the spec <code>Spec</code> from the
381 table <code>Tab</code> and returns the number deleted.</p>.</td></tr><tr><td valign="top"><a href="#select_reverse-2">select_reverse/2</a></td><td><p>Continues a select reverse started with <code>select_reverse/3</code>.</p>.</td></tr><tr><td valign="top"><a href="#select_reverse-3">select_reverse/3</a></td><td><p>Matches in reverse the objects in the table <code>Tab</code> against the
382 spec <code>Spec</code>.</p>.</td></tr><tr><td valign="top"><a href="#select_reverse-4">select_reverse/4</a></td><td><p>Matches in reverse the objects in the table <code>Tab</code> against the
383 spec <code>Spec</code> and returns a limited (<code>Limit</code>) number of matching
384 objects.</p>.</td></tr><tr><td valign="top"><a href="#tab2list-2">tab2list/2</a></td><td><p>Returns a list of all objects in the table <code>Tab</code>. The
d8943da Joseph Wayne Norton Refresh edocs
authored
385 operation is <strong>not</strong> guaranteed to be atomic and isolated.</p>.</td></tr><tr><td valign="top"><a href="#tid-2">tid/2</a></td><td><p>Returns a table's identifier.</p>.</td></tr><tr><td valign="top"><a href="#tid-3">tid/3</a></td><td><p>Returns a copy of a table's identifier with the given
386 implementation options.</p>.</td></tr></table>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
387
388
389 <a name="functions"></a>
390
0aef2af Joseph Wayne Norton Update docs
authored
391 ## Function Details ##
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
392
393 <a name="all-1"></a>
394
0aef2af Joseph Wayne Norton Update docs
authored
395 ### all/1 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
396
397
0aef2af Joseph Wayne Norton Update docs
authored
398 <pre><code>
399 all(NS::<a href="#type-gen_ns">gen_ns()</a>) -&gt; [<a href="#type-gen_tab">gen_tab()</a>]
400 </code></pre>
401
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
402 <br></br>
403
404
405 <p>Returns a list of all tables at the node.</p>
406
407
0aef2af Joseph Wayne Norton Update docs
authored
408 __See also:__ [ets:all/0](ets.md#all-0).
409 <a name="behaviour_info-1"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
410
0aef2af Joseph Wayne Norton Update docs
authored
411 ### behaviour_info/1 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
412
413 `behaviour_info(Other) -> any()`
414
0aef2af Joseph Wayne Norton Update docs
authored
415
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
416 <a name="delete-2"></a>
417
0aef2af Joseph Wayne Norton Update docs
authored
418 ### delete/2 ###
419
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
420
0aef2af Joseph Wayne Norton Update docs
authored
421 <pre><code>
422 delete(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; true
423 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
424
425 <br></br>
426
427
428 <p>Deletes the entire table <code>Tab</code>.</p>
429
430
0aef2af Joseph Wayne Norton Update docs
authored
431 __See also:__ [ets:delete/1](ets.md#delete-1).
432 <a name="delete-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
433
0aef2af Joseph Wayne Norton Update docs
authored
434 ### delete/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
435
436
0aef2af Joseph Wayne Norton Update docs
authored
437 <pre><code>
438 delete(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>) -&gt; true
439 </code></pre>
440
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
441 <br></br>
442
443
444 <p>Deletes all objects with the key <code>Key</code> from the table <code>Tab</code>.</p>
445
446
0aef2af Joseph Wayne Norton Update docs
authored
447 __See also:__ [ets:delete/2](ets.md#delete-2).
448 <a name="delete_all_objects-2"></a>
449
450 ### delete_all_objects/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
451
452
0aef2af Joseph Wayne Norton Update docs
authored
453 <pre><code>
454 delete_all_objects(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; true
455 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
456
457 <br></br>
458
459
460 <p>Delete all objects in the table <code>Tab</code>. The operation is
461 guaranteed to be atomic and isolated. This function only applies
462 to the <code>ets</code> implementation.</p>
463
464
0aef2af Joseph Wayne Norton Update docs
authored
465 __See also:__ [ets:delete_all_objects/1](ets.md#delete_all_objects-1).
466 <a name="destroy-3"></a>
467
468 ### destroy/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
469
470
0aef2af Joseph Wayne Norton Update docs
authored
471 <pre><code>
472 destroy(NS::<a href="#type-gen_ns">gen_ns()</a>, Name::<a href="#type-name">name()</a>, Opts::<a href="#type-opts">opts()</a>) -&gt; true
473 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
474
475 <br></br>
476
477
478 <p>Destroy the contents of the specified table.</p>
0aef2af Joseph Wayne Norton Update docs
authored
479
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
480 <a name="first-2"></a>
481
0aef2af Joseph Wayne Norton Update docs
authored
482 ### first/2 ###
483
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
484
0aef2af Joseph Wayne Norton Update docs
authored
485 <pre><code>
486 first(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
487 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
488
489 <br></br>
490
491
492 <p>Returns the first key <code>Key</code> in the table <code>Tab</code>. If the table
493 is empty, <code><em>$end_of_table</em></code> will be returned.</p>
494
495
0aef2af Joseph Wayne Norton Update docs
authored
496 __See also:__ [ets:first/1](ets.md#first-1).
497 <a name="foldl-4"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
498
0aef2af Joseph Wayne Norton Update docs
authored
499 ### foldl/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
500
501
0aef2af Joseph Wayne Norton Update docs
authored
502 <pre><code>
503 foldl(NS::<a href="#type-gen_ns">gen_ns()</a>, Fun, Acc0::term(), Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; Acc1::term()
504 </code></pre>
505
506 <ul class="definitions"><li><code>Fun = fun((Element::term(), AccIn::term()) -&gt; AccOut::term())</code></li></ul>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
507
508 <p>Fold from left to right over the elements of the table.</p>
509
510
0aef2af Joseph Wayne Norton Update docs
authored
511 __See also:__ [ets:foldl/3](ets.md#foldl-3).
512 <a name="foldr-4"></a>
513
514 ### foldr/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
515
516
0aef2af Joseph Wayne Norton Update docs
authored
517 <pre><code>
518 foldr(NS::<a href="#type-gen_ns">gen_ns()</a>, Fun, Acc0::term(), Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; Acc1::term()
519 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
520
0aef2af Joseph Wayne Norton Update docs
authored
521 <ul class="definitions"><li><code>Fun = fun((Element::term(), AccIn::term()) -&gt; AccOut::term())</code></li></ul>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
522
523 <p>Fold from right to left over the elements of the table.</p>
524
525
0aef2af Joseph Wayne Norton Update docs
authored
526 __See also:__ [ets:foldr/3](ets.md#foldr-3).
527 <a name="info-2"></a>
528
529 ### info/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
530
531
0aef2af Joseph Wayne Norton Update docs
authored
532 <pre><code>
533 info(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; [{<a href="#type-item">item()</a>, term()}]
534 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
535
536 <br></br>
537
538
539 <p>Returns information about the table <code>Tab</code> as a list of <code>{Item,
540 Value}</code> tuples.</p>
541
542
0aef2af Joseph Wayne Norton Update docs
authored
543 __See also:__ [info/2](#info-2).
544 <a name="info-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
545
0aef2af Joseph Wayne Norton Update docs
authored
546 ### info/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
547
548
0aef2af Joseph Wayne Norton Update docs
authored
549 <pre><code>
550 info(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Item::<a href="#type-item">item()</a>) -&gt; term()
551 </code></pre>
552
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
553 <br></br>
554
555
556 <p>Returns the information associated with <code>Item</code> for the table <code>Tab</code>.</p>
557
558
559 <pre><code>Valid +Item+ options are:</code></pre>
560
561 <ul>
562 <li>
563 <p>
564 <code>owner</code>
565 </p>
566 </li>
567 <li>
568 <p>
569 <code>name</code>
570 </p>
571 </li>
572 <li>
573 <p>
574 <code>named_table</code> <em>only the ets implementation</em>
575 </p>
576 </li>
577 <li>
578 <p>
579 <code>type</code>
580 </p>
581 </li>
582 <li>
583 <p>
584 <code>keypos</code>
585 </p>
586 </li>
587 <li>
588 <p>
589 <code>protection</code>
590 </p>
591 </li>
592 <li>
593 <p>
594 <code>compressed</code>
595 </p>
596 </li>
597 <li>
598 <p>
599 <code>async</code> <em>only the drv implementation</em>
600 </p>
601 </li>
602 <li>
603 <p>
604 <code>memory</code> <em>only the ets implementation</em>
605 </p>
606 </li>
607 <li>
608 <p>
609 <code>size</code> <em>only the ets implementation</em>
610 </p>
611 </li>
612 </ul>
613
614
0aef2af Joseph Wayne Norton Update docs
authored
615 __See also:__ [ets:info/2](ets.md#info-2).
616 <a name="insert-3"></a>
617
618 ### insert/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
619
620
0aef2af Joseph Wayne Norton Update docs
authored
621 <pre><code>
622 insert(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, ObjOrObjs::<a href="#type-object">object()</a> | [<a href="#type-object">object()</a>]) -&gt; true
623 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
624
625 <br></br>
626
627
628 <p>Inserts the object or all of the objects in the list
629 <code>ObjOrObjs</code> into the table <code>Tab</code>.</p>
630
631
0aef2af Joseph Wayne Norton Update docs
authored
632 __See also:__ [ets:insert/2](ets.md#insert-2).
633 <a name="insert_new-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
634
0aef2af Joseph Wayne Norton Update docs
authored
635 ### insert_new/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
636
637
0aef2af Joseph Wayne Norton Update docs
authored
638 <pre><code>
639 insert_new(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, ObjOrObjs::<a href="#type-object">object()</a> | [<a href="#type-object">object()</a>]) -&gt; true
640 </code></pre>
641
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
642 <br></br>
643
644
645 <p>This function works exactly like <code>insert/2</code>, with the
646 exception that instead of overwriting objects with the same key, it
647 simply returns false. This function only applies to the <code>ets</code>
648 implementation.</p>
649
650
0aef2af Joseph Wayne Norton Update docs
authored
651 __See also:__ [ets:insert_new/2](ets.md#insert_new-2).
652 <a name="last-2"></a>
653
654 ### last/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
655
656
0aef2af Joseph Wayne Norton Update docs
authored
657 <pre><code>
658 last(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
659 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
660
661 <br></br>
662
663
664 <p>Returns the last key <code>Key</code> in the table <code>Tab</code>. If the table
665 is empty, <code><em>$end_of_table</em></code> will be returned.</p>
666
667
0aef2af Joseph Wayne Norton Update docs
authored
668 __See also:__ [ets:last/1](ets.md#last-1).
669 <a name="lookup-3"></a>
670
671 ### lookup/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
672
673
0aef2af Joseph Wayne Norton Update docs
authored
674 <pre><code>
675 lookup(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>) -&gt; [<a href="#type-object">object()</a>]
676 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
677
678 <br></br>
679
680
681 <p>Returns a list of all objects with the key <code>Key</code> in the table
682 <code>Tab</code>.</p>
683
684
0aef2af Joseph Wayne Norton Update docs
authored
685 __See also:__ [ets:lookup/2](ets.md#lookup-2).
686 <a name="lookup_element-4"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
687
0aef2af Joseph Wayne Norton Update docs
authored
688 ### lookup_element/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
689
690
0aef2af Joseph Wayne Norton Update docs
authored
691 <pre><code>
692 lookup_element(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>, Pos::<a href="#type-pos">pos()</a>) -&gt; term()
693 </code></pre>
694
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
695 <br></br>
696
697
698 <p>Returns the <code>Pos</code>:th element of the object with the key <code>Key</code>
699 in the table <code>Tab</code>.</p>
700
701
0aef2af Joseph Wayne Norton Update docs
authored
702 __See also:__ [ets:lookup_element/3](ets.md#lookup_element-3).
703 <a name="match-2"></a>
704
705 ### match/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
706
707
0aef2af Joseph Wayne Norton Update docs
authored
708 <pre><code>
709 match(NS::<a href="#type-gen_ns">gen_ns()</a>, X2::<a href="#type-cont">cont()</a> | '$end_of_table') -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
710 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
711
712 <br></br>
713
714
715 <p>Continues a match started with <code>match/3</code>.</p>
716
717
0aef2af Joseph Wayne Norton Update docs
authored
718 __See also:__ [ets:match/1](ets.md#match-1).
719 <a name="match-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
720
0aef2af Joseph Wayne Norton Update docs
authored
721 ### match/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
722
723
0aef2af Joseph Wayne Norton Update docs
authored
724 <pre><code>
725 match(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Pattern::<a href="#type-match_pattern">match_pattern()</a>) -&gt; [<a href="#type-match">match()</a>]
726 </code></pre>
727
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
728 <br></br>
729
730
731 <p>Matches the objects in the table <code>Tab</code> against the pattern
732 <code>Pattern</code>.</p>
733
734
0aef2af Joseph Wayne Norton Update docs
authored
735 __See also:__ [ets:match/2](ets.md#match-2).
736 <a name="match-4"></a>
737
738 ### match/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
739
740
0aef2af Joseph Wayne Norton Update docs
authored
741 <pre><code>
742 match(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Pattern::<a href="#type-match_pattern">match_pattern()</a>, Limit::<a href="#type-limit">limit()</a>) -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
743 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
744
745 <br></br>
746
747
748 <p>Matches the objects in the table <code>Tab</code> against the pattern
749 <code>Pattern</code> and returns a limited (<code>Limit</code>) number of matching
750 objects.</p>
751
752
0aef2af Joseph Wayne Norton Update docs
authored
753 __See also:__ [ets:match/3](ets.md#match-3).
754 <a name="match_delete-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
755
0aef2af Joseph Wayne Norton Update docs
authored
756 ### match_delete/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
757
758
0aef2af Joseph Wayne Norton Update docs
authored
759 <pre><code>
760 match_delete(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Pattern::<a href="#type-match_pattern">match_pattern()</a>) -&gt; true
761 </code></pre>
762
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
763 <br></br>
764
765
766 <p>Deletes all objects which match the pattern <code>Pattern</code> from the
767 table <code>Tab</code>.</p>
768
769
0aef2af Joseph Wayne Norton Update docs
authored
770 __See also:__ [ets:match_delete/2](ets.md#match_delete-2).
771 <a name="match_object-2"></a>
772
773 ### match_object/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
774
775
0aef2af Joseph Wayne Norton Update docs
authored
776 <pre><code>
777 match_object(NS::<a href="#type-gen_ns">gen_ns()</a>, X2::<a href="#type-cont">cont()</a> | '$end_of_table') -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
778 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
779
780 <br></br>
781
782
783 <p>Continues a match started with <code>match_object/3</code>.</p>
784
785
0aef2af Joseph Wayne Norton Update docs
authored
786 __See also:__ [ets:match_object/1](ets.md#match_object-1).
787 <a name="match_object-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
788
0aef2af Joseph Wayne Norton Update docs
authored
789 ### match_object/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
790
791
0aef2af Joseph Wayne Norton Update docs
authored
792 <pre><code>
793 match_object(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Pattern::<a href="#type-match_pattern">match_pattern()</a>) -&gt; [<a href="#type-match">match()</a>]
794 </code></pre>
795
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
796 <br></br>
797
798
799 <p>Matches the objects in the table <code>Tab</code> against the pattern
800 <code>Pattern</code>.</p>
801
802
0aef2af Joseph Wayne Norton Update docs
authored
803 __See also:__ [ets:match_object/2](ets.md#match_object-2).
804 <a name="match_object-4"></a>
805
806 ### match_object/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
807
808
0aef2af Joseph Wayne Norton Update docs
authored
809 <pre><code>
810 match_object(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Pattern::<a href="#type-match_pattern">match_pattern()</a>, Limit::<a href="#type-limit">limit()</a>) -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
811 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
812
813 <br></br>
814
815
816 <p>Matches the objects in the table <code>Tab</code> against the pattern
817 <code>Pattern</code> and returns a limited (<code>Limit</code>) number of matching
818 objects.</p>
819
820
0aef2af Joseph Wayne Norton Update docs
authored
821 __See also:__ [ets:match_object/3](ets.md#match_object-3).
822 <a name="member-3"></a>
823
824 ### member/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
825
826
0aef2af Joseph Wayne Norton Update docs
authored
827 <pre><code>
828 member(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>) -&gt; true | false
829 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
830
831 <br></br>
832
833
834 <p>Returns <code>true</code> if one or more elements in the table <code>Tab</code> has
835 the key <code>Key</code>, <code>false</code> otherwise.</p>
836
837
0aef2af Joseph Wayne Norton Update docs
authored
838 __See also:__ [ets:member/2](ets.md#member-2).
839 <a name="new-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
840
0aef2af Joseph Wayne Norton Update docs
authored
841 ### new/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
842
843
0aef2af Joseph Wayne Norton Update docs
authored
844 <pre><code>
845 new(NS::<a href="#type-gen_ns">gen_ns()</a>, Name::<a href="#type-name">name()</a>, Opts::<a href="#type-opts">opts()</a>) -&gt; <a href="#type-gen_tab">gen_tab()</a>
846 </code></pre>
847
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
848 <br></br>
849
850
851 <p>Creates a new table and returns a table identifier which can
852 be used in subsequent operations. The table identifier can be sent
853 to other processes so that a table can be shared between different
854 processes within a node.</p>
855
856
857 <pre><code>Valid GEN_ETS properties for +Options+ are:</code></pre>
858
859 <ul>
860 <li>
861 <p>
862 <code>set</code> The table is a set table - one key, one object, no order
863 among objects. This is the default table type.
864 </p>
865 </li>
866 <li>
867 <p>
868 <code>ordered_set</code> The table is an ordered_set table - one key, one
869 object, ordered in Erlang term order, which is the order implied
870 by the <code><</code> and <code>></code> operators.
871 </p>
872 </li>
873 <li>
874 <p>
875 <code>named_table</code> If this option is present, the name <code>Name</code> is
876 associated with the table identifier.
877 </p>
878 </li>
879 <li>
880 <p>
881 <code>{keypos,pos_integer()}</code> Specfies which element in the stored
882 tuples should be used as key. By default, it is the first
883 element, i.e. <code>Pos=1</code>.
884 </p>
885 </li>
886 <li>
887 <p>
888 <code>public</code> Any process may read or write to the table.
889 </p>
890 </li>
891 <li>
892 <p>
893 <code>protected</code> The owner process can read and write to the table.
894 Other processes can only read the table. This is the default
895 setting for the access rights.
896 </p>
897 </li>
898 <li>
899 <p>
900 <code>private</code> Only the owner process can read or write to the table.
901 </p>
902 </li>
903 <li>
904 <p>
905 <code>compressed</code> If this option is present, the table data will be
906 stored in a compressed format.
907 </p>
908 </li>
909 <li>
910 <p>
911 <code>async</code> If this option is present and supported by the
912 implementation, the emulator's async thread pool will be used
913 when accessing the table data.
914 </p>
915 </li>
916 <li>
917 <p>
d8943da Joseph Wayne Norton Refresh edocs
authored
918 <code>{impl, module(), impl_opts()}</code> The module that implements
919 GEN_ETS callback functions. Implementation specific options can be
920 given. The default is <code>{impl, gen_ets_impl_ets, []}</code>.
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
921 </p>
922 </li>
923 </ul>
924
925
0aef2af Joseph Wayne Norton Update docs
authored
926 __See also:__ [ets:new/2](ets.md#new-2).
927 <a name="next-3"></a>
928
929 ### next/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
930
931
0aef2af Joseph Wayne Norton Update docs
authored
932 <pre><code>
933 next(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
934 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
935
936 <br></br>
937
938
939 <p>Returns the next key <code>Key2</code>, following the key <code>Key1</code> in the
940 table <code>Tab</code>. If there is no next key, <code><em>$end_of_table</em></code> is
941 returned.</p>
942
943
0aef2af Joseph Wayne Norton Update docs
authored
944 __See also:__ [ets:next/2](ets.md#next-2).
945 <a name="prev-3"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
946
0aef2af Joseph Wayne Norton Update docs
authored
947 ### prev/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
948
949
0aef2af Joseph Wayne Norton Update docs
authored
950 <pre><code>
951 prev(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Key::<a href="#type-key">key()</a>) -&gt; <a href="#type-key">key()</a> | '$end_of_table'
952 </code></pre>
953
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
954 <br></br>
955
956
957 <p>Returns the previous key <code>Key2</code>, following the key <code>Key1</code> in
958 the table <code>Tab</code>. If there is no previous key, <code><em>$end_of_table</em></code> is
959 returned.</p>
960
961
0aef2af Joseph Wayne Norton Update docs
authored
962 __See also:__ [ets:prev/2](ets.md#prev-2).
963 <a name="repair-3"></a>
964
965 ### repair/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
966
967
0aef2af Joseph Wayne Norton Update docs
authored
968 <pre><code>
969 repair(NS::<a href="#type-gen_ns">gen_ns()</a>, Name::<a href="#type-name">name()</a>, Opts::<a href="#type-opts">opts()</a>) -&gt; true
970 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
971
972 <br></br>
973
974
975 <p>If a table cannot be opened, you may attempt to call this
976 method to resurrect as much of the contents of the table as
977 possible. Some data may be lost, so be careful when calling this
978 function on a table that contains important information.</p>
0aef2af Joseph Wayne Norton Update docs
authored
979
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
980 <a name="select-2"></a>
981
0aef2af Joseph Wayne Norton Update docs
authored
982 ### select/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
983
984
0aef2af Joseph Wayne Norton Update docs
authored
985 <pre><code>
986 select(NS::<a href="#type-gen_ns">gen_ns()</a>, X2::<a href="#type-cont">cont()</a> | '$end_of_table') -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
987 </code></pre>
988
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
989 <br></br>
990
991
992 <p>Continues a select started with <code>select/3</code>.</p>
993
994
0aef2af Joseph Wayne Norton Update docs
authored
995 __See also:__ [ets:select/1](ets.md#select-1).
996 <a name="select-3"></a>
997
998 ### select/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
999
1000
0aef2af Joseph Wayne Norton Update docs
authored
1001 <pre><code>
1002 select(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>) -&gt; [<a href="#type-match">match()</a>]
1003 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1004
1005 <br></br>
1006
1007
1008 <p>Matches the objects in the table <code>Tab</code> against the spec
1009 <code>Spec</code>.</p>
1010
1011
0aef2af Joseph Wayne Norton Update docs
authored
1012 __See also:__ [ets:select/2](ets.md#select-2).
1013 <a name="select-4"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1014
0aef2af Joseph Wayne Norton Update docs
authored
1015 ### select/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1016
1017
0aef2af Joseph Wayne Norton Update docs
authored
1018 <pre><code>
1019 select(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>, Limit::<a href="#type-limit">limit()</a>) -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
1020 </code></pre>
1021
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1022 <br></br>
1023
1024
1025 <p>Matches the objects in the table <code>Tab</code> against the spec <code>Spec</code>
1026 and returns a limited (<code>Limit</code>) number of matching objects.</p>
1027
1028
0aef2af Joseph Wayne Norton Update docs
authored
1029 __See also:__ [ets:select/3](ets.md#select-3).
1030 <a name="select_count-3"></a>
1031
1032 ### select_count/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1033
1034
0aef2af Joseph Wayne Norton Update docs
authored
1035 <pre><code>
1036 select_count(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>) -&gt; pos_integer()
1037 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1038
1039 <br></br>
1040
1041
1042 <p>Counts all objects which match the spec <code>Spec</code> from the
1043 table <code>Tab</code> and returns the number matched.</p>
1044
1045
0aef2af Joseph Wayne Norton Update docs
authored
1046 __See also:__ [ets:select_count/2](ets.md#select_count-2).
1047 <a name="select_delete-3"></a>
1048
1049 ### select_delete/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1050
1051
0aef2af Joseph Wayne Norton Update docs
authored
1052 <pre><code>
1053 select_delete(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>) -&gt; pos_integer()
1054 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1055
1056 <br></br>
1057
1058
1059 <p>Deletes all objects which match the spec <code>Spec</code> from the
1060 table <code>Tab</code> and returns the number deleted.</p>
1061
1062
0aef2af Joseph Wayne Norton Update docs
authored
1063 __See also:__ [ets:select_delete/2](ets.md#select_delete-2).
1064 <a name="select_reverse-2"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1065
0aef2af Joseph Wayne Norton Update docs
authored
1066 ### select_reverse/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1067
1068
0aef2af Joseph Wayne Norton Update docs
authored
1069 <pre><code>
1070 select_reverse(NS::<a href="#type-gen_ns">gen_ns()</a>, X2::<a href="#type-cont">cont()</a> | '$end_of_table') -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
1071 </code></pre>
1072
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1073 <br></br>
1074
1075
1076 <p>Continues a select reverse started with <code>select_reverse/3</code>.</p>
1077
1078
0aef2af Joseph Wayne Norton Update docs
authored
1079 __See also:__ [ets:select_reverse/1](ets.md#select_reverse-1).
1080 <a name="select_reverse-3"></a>
1081
1082 ### select_reverse/3 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1083
1084
0aef2af Joseph Wayne Norton Update docs
authored
1085 <pre><code>
1086 select_reverse(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>) -&gt; [<a href="#type-match">match()</a>]
1087 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1088
1089 <br></br>
1090
1091
1092 <p>Matches in reverse the objects in the table <code>Tab</code> against the
1093 spec <code>Spec</code>.</p>
1094
1095
0aef2af Joseph Wayne Norton Update docs
authored
1096 __See also:__ [ets:select_reverse/2](ets.md#select_reverse-2).
1097 <a name="select_reverse-4"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1098
0aef2af Joseph Wayne Norton Update docs
authored
1099 ### select_reverse/4 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1100
1101
0aef2af Joseph Wayne Norton Update docs
authored
1102 <pre><code>
1103 select_reverse(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Spec::<a href="#type-match_spec">match_spec()</a>, Limit::<a href="#type-limit">limit()</a>) -&gt; {[<a href="#type-match">match()</a>], <a href="#type-cont">cont()</a> | '$end_of_table'} | '$end_of_table'
1104 </code></pre>
1105
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1106 <br></br>
1107
1108
1109 <p>Matches in reverse the objects in the table <code>Tab</code> against the
1110 spec <code>Spec</code> and returns a limited (<code>Limit</code>) number of matching
1111 objects.</p>
1112
1113
0aef2af Joseph Wayne Norton Update docs
authored
1114 __See also:__ [ets:select_reverse/3](ets.md#select_reverse-3).
1115 <a name="tab2list-2"></a>
1116
1117 ### tab2list/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1118
1119
0aef2af Joseph Wayne Norton Update docs
authored
1120 <pre><code>
1121 tab2list(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; [<a href="#type-object">object()</a>]
1122 </code></pre>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1123
1124 <br></br>
1125
1126
1127 <p>Returns a list of all objects in the table <code>Tab</code>. The
1128 operation is <strong>not</strong> guaranteed to be atomic and isolated.</p>
1129
1130
0aef2af Joseph Wayne Norton Update docs
authored
1131 __See also:__ [ets:tab2list/1](ets.md#tab2list-1).
1132 <a name="tid-2"></a>
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1133
0aef2af Joseph Wayne Norton Update docs
authored
1134 ### tid/2 ###
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1135
1136
0aef2af Joseph Wayne Norton Update docs
authored
1137 <pre><code>
1138 tid(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>) -&gt; <a href="#type-gen_tid">gen_tid()</a>
1139 </code></pre>
1140
d3affc6 Joseph Wayne Norton Generate edocs via asciiedoc
authored
1141 <br></br>
1142
1143
b9cf2ac Joseph Wayne Norton Refresh edocs
authored
1144 <p>Returns a table's identifier.</p>
0aef2af Joseph Wayne Norton Update docs
authored
1145
d8943da Joseph Wayne Norton Refresh edocs
authored
1146 <a name="tid-3"></a>
1147
1148 ### tid/3 ###
1149
1150
1151 <pre><code>
1152 tid(NS::<a href="#type-gen_ns">gen_ns()</a>, Tab::<a href="#type-gen_tab">gen_tab()</a>, Opts::term()) -&gt; <a href="#type-gen_tid">gen_tid()</a>
1153 </code></pre>
1154
1155 <br></br>
1156
1157
1158 <p>Returns a copy of a table's identifier with the given
1159 implementation options.</p>
1160
Something went wrong with that request. Please try again.