// prepareDocument moves the `id` field to the `_id` field, which is more
// commonly used by downstream sinks. A transformer could be used to do the
// same thing, but because transformers are not run for Delete messages, we
// must do it here.
prepareDocument moves the `id` field to the `_id` field, which is more
commonly used by downstream sinks. A transformer could be used to do the
same thing, but because transformers are not run for Delete messages, we
must do it here.
// prepareDocument moves the ` id ` field to the ` _id ` field which is more // commonly used by downstream sinks . A transformer could be used to do the // same thing but because transformers are not run for Delete messages we // must do it here .
func (r *Rethinkdb) prepareDocument(doc map[string]interface{}) map[string]interface{} {
	doc["_id"] = doc["id"]
	delete(doc, "id")
	return doc
}
func ( r * Rethinkdb ) prepareDocument ( doc map [ string ] interface { } ) map [ string ] interface { } { doc [ " " ] = doc [ " " ] delete ( doc , " " ) return doc }
prepareDocument moves the `id` field to the `_id` field, which is more
commonly used by downstream sinks.
prepareDocument moves the ` id ` field to the ` _id ` field which is more commonly used by downstream sinks .