Defining records at runtime
Hans Bolinder
hasse@REDACTED
Thu Apr 6 09:01:00 CEST 2006
[tty@REDACTED:]
> I get around that by finding the index of Attr and doing
> 'element(Index, P) == MatchVal' instead.
Be careful to use =:=/2 rather than ==/2, or QLC will scan the whole
table even if Index is the key position or there is an index on
position Index.
Use ==/2 only if you want comparison rather than matching.
For example, "2.0 == 2" is true, but "2.0 =:= 2" is false.
Best regards,
Hans Bolinder, Erlang/OTP
More information about the erlang-questions
mailing list