· 8 years ago · Aug 18, 2018, 01:02 PM
1CREATE TABLE IF NOT EXISTS Social ("partitionId" text,"name" text, "id" text, "data1" text, "data2" text, "data3" map<text,text>, "data4 boolean, "data5" map<text, text>, primary key ("partitionId","name","id"));
2
3const newValue = Object.values({
4sId: '6e4d02ddc56bb014fee',
5sData: '{"stamina":"yes"}',
6rId: 'b1a264ed-b3ss9270316',
7re: '101-r'
8});
9
10const q = 'UPDATE social SET "data5[?] = ? WHERE "partitionId" = 'social' AND "id" = ? AND "name" = ?;';
11
12
13client.execute(q, newValue, { prepare: true }).then(result => console.log(result.wasApplied()));