Erlang/OTP Forums

Author Message

<  Erlang  ~  Match agains term_to_binary

datacompboy
Posted: Thu Aug 30, 2007 4:47 am Reply with quote
User Joined: 21 Sep 2006 Posts: 69 Location: Novosibirsk, Russia
Is there way to create mask for match agains term_to_binary result?

F.e., i have tuples in sql db:
term_to_binary({fine, XXX}).
term_to_binary({poor, YYY}).
term_to_binary({fine, ZZZ}).

i want to run sql query, that will return matches {fine, _}.

Is that possible, or only way also store keys for match on?

_________________
--- suicide proc near\n call death\n suicide endp
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
anderst
Posted: Sun Sep 09, 2007 6:19 pm Reply with quote
User Joined: 21 Nov 2006 Posts: 37
Have you tried to reverse engineer the binary representation of the data types you are converting? You can then patternmatch on the bitsyntax?

Sorry if I do not provide examples (Someone else up for it?). Just got back from two weeks in the sun and am catching up on email.

Hilsen,
Anders
View user's profile Send private message Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum