{"action":"created","issue":{"url":"https://api.github.com/repos/chenguo/franca-js/issues/10","repository_url":"https://api.github.com/repos/chenguo/franca-js","labels_url":"https://api.github.com/repos/chenguo/franca-js/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/chenguo/franca-js/issues/10/comments","events_url":"https://api.github.com/repos/chenguo/franca-js/issues/10/events","html_url":"https://github.com/chenguo/franca-js/issues/10","id":155088591,"number":10,"title":"Change on query object schema","user":{"login":"fanchen1988","id":5967789,"avatar_url":"https://avatars.githubusercontent.com/u/5967789?v=3","gravatar_id":"","url":"https://api.github.com/users/fanchen1988","html_url":"https://github.com/fanchen1988","followers_url":"https://api.github.com/users/fanchen1988/followers","following_url":"https://api.github.com/users/fanchen1988/following{/other_user}","gists_url":"https://api.github.com/users/fanchen1988/gists{/gist_id}","starred_url":"https://api.github.com/users/fanchen1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanchen1988/subscriptions","organizations_url":"https://api.github.com/users/fanchen1988/orgs","repos_url":"https://api.github.com/users/fanchen1988/repos","events_url":"https://api.github.com/users/fanchen1988/events{/privacy}","received_events_url":"https://api.github.com/users/fanchen1988/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"fanchen1988","id":5967789,"avatar_url":"https://avatars.githubusercontent.com/u/5967789?v=3","gravatar_id":"","url":"https://api.github.com/users/fanchen1988","html_url":"https://github.com/fanchen1988","followers_url":"https://api.github.com/users/fanchen1988/followers","following_url":"https://api.github.com/users/fanchen1988/following{/other_user}","gists_url":"https://api.github.com/users/fanchen1988/gists{/gist_id}","starred_url":"https://api.github.com/users/fanchen1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanchen1988/subscriptions","organizations_url":"https://api.github.com/users/fanchen1988/orgs","repos_url":"https://api.github.com/users/fanchen1988/repos","events_url":"https://api.github.com/users/fanchen1988/events{/privacy}","received_events_url":"https://api.github.com/users/fanchen1988/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-05-16T18:20:45Z","updated_at":"2016-05-20T17:53:32Z","closed_at":null,"body":"When I'm implementing the write operation, I encountered some problems and thought that we may need change the query object schema:\r\n0.) Since the write needs the type, query and option sometime, it's very confusing if we still allow `type` to be placed in the top level of query object. We should just put the `type` in the `query`, `insert` or `update`, they can specify the type just for `query` or `write`.\r\n1.) To make the first level keys of query object to be clear, maybe we should put `insert` and `update` into a key called `write`.\r\n\r\nHere is the proposed format after the changes:\r\n```json\r\n{\r\n  \"query\": {\r\n    \"type\": \"AND\",\r\n    \"queries\": []\r\n  },\r\n  \"write\": {\r\n    \"type\": \"RAW\",\r\n    \"update\": \"\"\r\n  },\r\n  \"options\": {\r\n    \"table\": \"test-table\",\r\n    \"offset\": 100,\r\n    \"singleRow\": true\r\n  }\r\n}\r\n```\r\n\r\n@chen-factual what do you think about this?"},"comment":{"url":"https://api.github.com/repos/chenguo/franca-js/issues/comments/220674559","html_url":"https://github.com/chenguo/franca-js/issues/10#issuecomment-220674559","issue_url":"https://api.github.com/repos/chenguo/franca-js/issues/10","id":220674559,"user":{"login":"chen-factual","id":3902082,"avatar_url":"https://avatars.githubusercontent.com/u/3902082?v=3","gravatar_id":"","url":"https://api.github.com/users/chen-factual","html_url":"https://github.com/chen-factual","followers_url":"https://api.github.com/users/chen-factual/followers","following_url":"https://api.github.com/users/chen-factual/following{/other_user}","gists_url":"https://api.github.com/users/chen-factual/gists{/gist_id}","starred_url":"https://api.github.com/users/chen-factual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chen-factual/subscriptions","organizations_url":"https://api.github.com/users/chen-factual/orgs","repos_url":"https://api.github.com/users/chen-factual/repos","events_url":"https://api.github.com/users/chen-factual/events{/privacy}","received_events_url":"https://api.github.com/users/chen-factual/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T17:53:32Z","updated_at":"2016-05-20T17:53:32Z","body":"I can see a corner use case for it, but in the interest of simplifying things I'd be glad if we enforce RAW to apply to everything, instead of selectively to just one or the other."}}
{"actor":{"display_login":"chen-factual"}}