Hi
I have a need to make copy of json document I will retrieve based on some key but save it with different Key and “id” attribute within the same bucket. Please note the "id " attribute value should be same as Key of the new copied document. I don’t know the other attributes and values of the document as it gets decided at runtime. FYI, I am using C# SDK.
I tried the below query but how do I change the “id” attribute value of the copied document:
INSERT INTO
bucket
(KEY UUID(), VALUE v) SELECT v FROMbucket
WHERE id=“xyz”
Since the document I pick is decided at runtime, I wont know the other attributes to frame my SELECT query. All I have to do is find the fastest way to copy entire document with all attributes and only change KEY and “id” attribute value before saving it again.