I have couchbase document like:
{
“_type”: “activity”,
“name”: “october08”
“count”: “35”,
“_id”: “00ae5de2-c62c-4689-ba2d-2bb1e8b7563a”
}
I want to remove count property from couchbase document.
How to query the above scenario ?
I have couchbase document like:
{
“_type”: “activity”,
“name”: “october08”
“count”: “35”,
“_id”: “00ae5de2-c62c-4689-ba2d-2bb1e8b7563a”
}
I want to remove count property from couchbase document.
How to query the above scenario ?
You can select fields required
SELECT _type, name,_id
FROM default
WHERE .....
OR
SELECT OBJECT_REMOVE(d,"count") AS d
FROM default AS d
WHERE ....;
https://docs.couchbase.com/server/5.5/n1ql/n1ql-language-reference/objectfun.html#object_remove
Actually I was looking for this,
UPDATE default UNSET count WHERE … ;
This will remove count from existing couchbase document
Thanks…