{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4194","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4194/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4194/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4194/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/4194","id":73699587,"number":4194,"title":"Explicit \"action\" field in changefeed documents","user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/labels/tp:ReQL_proposal","name":"tp:ReQL_proposal","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/41","html_url":"https://github.com/rethinkdb/rethinkdb/milestones/subsequent","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/41/labels","id":367201,"number":41,"title":"subsequent","description":"","creator":{"login":"coffeemug","id":48436,"avatar_url":"https://avatars.githubusercontent.com/u/48436?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeemug","html_url":"https://github.com/coffeemug","followers_url":"https://api.github.com/users/coffeemug/followers","following_url":"https://api.github.com/users/coffeemug/following{/other_user}","gists_url":"https://api.github.com/users/coffeemug/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeemug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeemug/subscriptions","organizations_url":"https://api.github.com/users/coffeemug/orgs","repos_url":"https://api.github.com/users/coffeemug/repos","events_url":"https://api.github.com/users/coffeemug/events{/privacy}","received_events_url":"https://api.github.com/users/coffeemug/received_events","type":"User","site_admin":false},"open_issues":322,"closed_issues":0,"state":"open","created_at":"2013-06-30T07:32:52Z","updated_at":"2015-05-06T22:37:16Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-05-06T18:27:36Z","updated_at":"2015-05-07T03:31:53Z","closed_at":null,"body":"Suggested by Steven Perez.\r\n\r\nIn changefeed documents, we currently implicitly encode whether they are a deletion, and insertion, an update/replace or an initial result by setting some of `old_val` and `new_val` to `null` or by omitting `old_val` entirely.\r\n\r\nThe proposal is to encode this information explicitly by adding an additional field. For example\r\n`action: 'delete'`\r\n`action: 'insert'`\r\n`action: 'replace'`\r\n`action: 'initial'`\r\n\r\nIncidentally, our current system also breaks if you have a changefeed like this:\r\n`r.table('t1')('a').changes()`\r\n\r\nand you set the value of `a` to `null` for a document. The generated change event will be indistinguishable from a deletion. Additionally, when deleting a document that currently has `a: null`, no change event is generated."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/99700491","html_url":"https://github.com/rethinkdb/rethinkdb/issues/4194#issuecomment-99700491","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/4194","id":99700491,"user":{"login":"StevenPerez","id":10041338,"avatar_url":"https://avatars.githubusercontent.com/u/10041338?v=3","gravatar_id":"","url":"https://api.github.com/users/StevenPerez","html_url":"https://github.com/StevenPerez","followers_url":"https://api.github.com/users/StevenPerez/followers","following_url":"https://api.github.com/users/StevenPerez/following{/other_user}","gists_url":"https://api.github.com/users/StevenPerez/gists{/gist_id}","starred_url":"https://api.github.com/users/StevenPerez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StevenPerez/subscriptions","organizations_url":"https://api.github.com/users/StevenPerez/orgs","repos_url":"https://api.github.com/users/StevenPerez/repos","events_url":"https://api.github.com/users/StevenPerez/events{/privacy}","received_events_url":"https://api.github.com/users/StevenPerez/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T03:31:53Z","updated_at":"2015-05-07T03:31:53Z","body":"Excellent 👍🏻\r\n\r\nThanks for listen Wise Rethinkdb Partners"}}