I insert data to Cassandra table using datastax library and spring framework
I use separator character "\t" to concat two strings this.pid + "\t" + this.cid;
If I select inserted data, I can see that data is saved
select * from table1;
pid | cid | key | value | update_time
-----+-----------+------+-------+--------------------------
1 | data1 | key1 | 01\tdata1 | 2019-xx-xx
2 | data2 | key2 | 02\tdata2 | 2019-xx-xx
But I cannot select that data with select statement
select * from table1 where pid=1 AND cid='data1' AND key='key1' AND value='1\tdata1';
should I escape '\t' character?
below is table scheme
CREATE TABLE table1 (
pid int,
cid text,
key text,
value text,
update_time timestamp,
PRIMARY KEY (pid, cid, key, value)
)
there is difference between inserted data by cql and java
I use Mac OS, when I select on Mac console, I can see that "\t" character color is different
inserted data using java
inserted data using cql