I am in need to move a large amount of docs between two buckets on the same server. Based on the sample found
INSERT INTO `travel-sample` (KEY UUID(), VALUE _country) SELECT _country FROM `travel-sample` _country WHERE type = "airport" AND airportname = "Heathrow" RETURNING *;
i was wondering if there is a way to copy the whole doc without specifying all the fields to copy /insert into the new doc and also use some values from the old doc like _type and _id to construct a new key which is same as the old one. Or is there a way to get the meta().id to use the same key as the original id. If i take all fields from the source doc, how can i add like a field of _type=‘message’ ? to the doc being saved ?
Finally is there a way to delete the source doc automatically after the new doc has been created ?