[erlang-questions] How to return all records in dets

Ulf Wiger ulf@REDACTED
Fri May 30 22:11:56 CEST 2014


Sorry, you said “dets”. :)

No matter, substitute “dets:” for “ets:” in all places except for ets:fun2ms/1.

BR,
Ulf W

On 30 May 2014, at 22:08, Ulf Wiger <ulf@REDACTED> wrote:

> 
> ets:tab2list(Tab).
> 
> ets:select(Tab, [{‘_’, [], [‘$_’]}]).
> 
> ets:select(Tab, ets:fun2ms(fun(X) -> X end).
> 
> ets:match_object(Tab, ‘_’)
> 
> BR,
> Ulf W
> 
> On 30 May 2014, at 21:56, lloyd@REDACTED wrote:
> 
>> Hello,
>> 
>> I'm cross-eyed from looking at match specifications. All I want to do is list all records in my small dets table. I once ran across a very neat query to accomplish that, but for the life can't Google it up.
>> 
>> Can some kind soul give me a query that works?
>> 
>> Many thanks,
>> 
>> LRP 
>> 
>> 
>> 
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
> 
> Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
> http://feuerlabs.com
> 
> 
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.
http://feuerlabs.com






More information about the erlang-questions mailing list