In scanning the docs I cannot find how to update part of a document in N1QL in 4.5
for example - say the whole document looks like this: { “Active”: true, “Barcode”: “123456789”, “BrandID”: “9f3751ef-f14f-464a-bb86-854e99cf14c0”, “BuyCurrencyOverride”: “.37”, “BuyDiscountAmount”: “45.00”, “ID”: “003565a3-4a0d-47d9-befb-0ac642cb8057”, }
but I only want to work with part of the document as I don’t want to be selecting / updating the whole document in many cases:
{ “Active”: false, “Barcode”: “999999999”, “BrandID”: “9f3751ef-f14f-464a-bb86-854e99cf14c0”, “ID”: “003565a3-4a0d-47d9-befb-0ac642cb8057”, }
How can I use N1QL to just update those fields? Upsert completely replaces the whole document and update statement is not that clear. I can see this page http://developer.couchbase.com/documentation/server/4.5-dp/sub-doc-api.html shows how to do it , but not in N1QL.