更新cassandra中的用户定义类型数据

时间:2018-09-03 19:29:00

标签: cassandra cassandra-2.0 cqlsh

您好,我无法更新UDT数据

这是我的UDT定义;

create type service(svcId text,status int)  -----> user Defined Type

INSERT INTO test JSON '{"id":1,"musicid":2,"service": {"svcId": "44600612","status": 1}}' 

->希望将svcid从以前的44600612更新为400,而其余字段状态保持不变。

在cqlsh中尝试了以下内容

update test set service.svcid='400' where id =1;

遇到以下异常

SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:26 no viable alternative at input '.' (update test set service[.]...)">

0 个答案:

没有答案
相关问题