|
is_member in match specs: msg#00243lang.erlang.general
I keep revisiting a certain database problem where I want to perform fast lookups of a certain type. The solution I keep coming back to is this: I would like to have the boolFunction 'is_member', corresponding to lists:member(X, List) to use in an ets:select(). Basically, the problem is this: I have a table, file_vsn: #file_vsn{key = {Filename, Vsn}, views = [View]} and another table, file_views: #file_views{key = {View, Filename}, vsn = Vsn} I want to be able to perform rapid searches on file_vsn, where I select exactly the version of a file that is visible in the current view (the name of the view is a member of the list #file_vsn.views. The alternative I will probably use is to fetch every version of {Filename, Vsn} (could be 10-15 different ones) to the heap and "manually" filter on lists:member(). It seems to me as if this pattern should be quite useful in several different settings. /Uffe -- Ulf Wiger, Senior System Architect EAB/UPD/S |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Building under cygwin: 00243, Kent Boortz |
|---|---|
| Next by Date: | ANNOUNCE ex11 release two: 00243, Joe Armstrong |
| Previous by Thread: | Building under cygwini: 00243, Chappell, Simon P |
| Next by Thread: | ANNOUNCE ex11 release two: 00243, Joe Armstrong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |