[erlang-questions] Mnesia -- "equals ignore case" equivalent?

Ulf Wiger ulf.wiger@REDACTED
Tue Jun 9 11:19:19 CEST 2009

I once wrote some code to convert a regexp to a
match specification. Given that you cannot recurse
in match specs, it has some severe limitations. If you
can live with those, you might get some mileage out of
this approach.


Eshell V5.7.1  (abort with ^G)
1> rdbms_ms:re_match(["ulf","Ulf","ULF","abc"],"[uU][lL][fF]").
3> rdbms_ms:re("[uU][lL][fF]").

At least it beats writing the same thing by hand. :)

One obvious problem is that, since the key part will be unbound,
it will result in a linear search. Not knowing your specific
problem, this may or may not be a killer. :/

Ulf W

Steve Davis wrote:
> Hi,
> I can't see any advice previously offered for the best way to query a
> (large) mnesia table with a query comparable to "equals ignore case".
> My first thought is to storing an indexed lower or upper "case"
> version of the data in an additional field, but with nearly 20 million
> records that doesn't seem very attractive.
> TIA for any thoughts,
> Regards,
> Steve
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org

Ulf Wiger
CTO, Erlang Training & Consulting Ltd

More information about the erlang-questions mailing list