How to Update document using query

UPDATE landmark
USE KEYS “landmark_10090”
SET nickname = “Squiggly Bridge”
RETURNING landmark.nickname;

I can use this to set a new value for an attribute, but how to update a document like insert query:
"INSERT INTO{bucketName}(KEY,VALUE) VALUES(key,
{
“name”: “Tradeston Pedestrian Bridge”,
“nickname” = “Squiggly Bridge”
}
)

Thanks

UPSERT

UPSERT INTO bucketName 
VALUES("k01",{"name": "Tradeston Pedestrian Bridge","nickname" : "Squiggly Bridge"})

= not valid in JSON use as :

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.