0

I store my message and message id in cassandra database.I use https://github.com/matehat/cqerl client to work with ejabberd server for storing messages in cassandra database.I fetch records from cassandra database by select query using cqerl client:

cqerl:run_query(Pid,"SELECT * FROM CONV_DETAILS;").

I get list of binary integer as output as follows:

[<<0,0,0,9,52,57,49,56,52,48,52,57,55>>,
 <<0,0,0,8,0,0,0,14,204,123,132,9>>,
 <<0,0,0,2,110,111>>]

for the string "what are you doing now?".

How Can I avoid original string translated into ascii number as above?

BABU K
  • 917
  • 13
  • 35
  • I don't understand you question, what you see there is just the representation of your string as an io list, there is no conversion going on here. However this io list has nothing to do with your string as far as I can see. – filmor Feb 21 '14 at 13:17
  • message stored in cassandra database is "what are you doing now?".I want original message stored in database as above. But I am getting as list of integer numbers.Why it is being translated to number?. How can I avoid? – BABU K Feb 21 '14 at 13:25
  • @BABUK how does "CREATE" statement for the table look like? – Mikhail Stepura Feb 21 '14 at 18:41
  • @Mikhail My create statement structure as follows: cqerl:run_query(Pid,"CREATE TABLE MESSAGES(conversationid text,isimage text,sendtime timestamp,message text,PRIMARY KEY(conversationid,sendtime,isimage)) WITH COMPACT STORAGE;"). – BABU K Feb 22 '14 at 06:48
  • @BABUK Have you tried to create your table without `COMPACT STORAGE`? – Mikhail Stepura Feb 22 '14 at 18:21

0 Answers0