{"action":"created","issue":{"url":"https://api.github.com/repos/didi/gendry/issues/9","repository_url":"https://api.github.com/repos/didi/gendry","labels_url":"https://api.github.com/repos/didi/gendry/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/didi/gendry/issues/9/comments","events_url":"https://api.github.com/repos/didi/gendry/issues/9/events","html_url":"https://github.com/didi/gendry/pull/9","id":321076575,"number":9,"title":"feedback for dynamic sql generate based on text/template","user":{"login":"xurwxj","id":683421,"avatar_url":"https://avatars3.githubusercontent.com/u/683421?v=4","gravatar_id":"","url":"https://api.github.com/users/xurwxj","html_url":"https://github.com/xurwxj","followers_url":"https://api.github.com/users/xurwxj/followers","following_url":"https://api.github.com/users/xurwxj/following{/other_user}","gists_url":"https://api.github.com/users/xurwxj/gists{/gist_id}","starred_url":"https://api.github.com/users/xurwxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xurwxj/subscriptions","organizations_url":"https://api.github.com/users/xurwxj/orgs","repos_url":"https://api.github.com/users/xurwxj/repos","events_url":"https://api.github.com/users/xurwxj/events{/privacy}","received_events_url":"https://api.github.com/users/xurwxj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T07:41:46Z","updated_at":"2018-05-09T06:54:53Z","closed_at":"2018-05-09T06:54:53Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/didi/gendry/pulls/9","html_url":"https://github.com/didi/gendry/pull/9","diff_url":"https://github.com/didi/gendry/pull/9.diff","patch_url":"https://github.com/didi/gendry/pull/9.patch"},"body":"as subject, add DynQuery for dynamic sql generate based on text/template"},"comment":{"url":"https://api.github.com/repos/didi/gendry/issues/comments/387639205","html_url":"https://github.com/didi/gendry/pull/9#issuecomment-387639205","issue_url":"https://api.github.com/repos/didi/gendry/issues/9","id":387639205,"user":{"login":"caibirdme","id":8054803,"avatar_url":"https://avatars0.githubusercontent.com/u/8054803?v=4","gravatar_id":"","url":"https://api.github.com/users/caibirdme","html_url":"https://github.com/caibirdme","followers_url":"https://api.github.com/users/caibirdme/followers","following_url":"https://api.github.com/users/caibirdme/following{/other_user}","gists_url":"https://api.github.com/users/caibirdme/gists{/gist_id}","starred_url":"https://api.github.com/users/caibirdme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caibirdme/subscriptions","organizations_url":"https://api.github.com/users/caibirdme/orgs","repos_url":"https://api.github.com/users/caibirdme/repos","events_url":"https://api.github.com/users/caibirdme/events{/privacy}","received_events_url":"https://api.github.com/users/caibirdme/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T06:54:53Z","updated_at":"2018-05-09T06:54:53Z","author_association":"MEMBER","body":"Thx for your contribution, but according to our discussion, we all disagreed with adding such function into this library. Here are the reasons:\r\n* sql should and must be intuitive, what you see is what you get. You write a sql but another is executed just because of lacking of some params, it will and must get people stuck.\r\n* If you do need this(though it's always not recommended), it's better to add it in your project as a private lib such as\r\n```\r\ncompiledSQL,params := preCompileSQL(rawsql, params)\r\nbuilder.NamedQuery(compiledSQL, params...)\r\n```\r\n\r\nFinally, we do appreciate your work, looking forward for your further contribution. And it's always better to open an issue talking about the problems with us before pulling request directly "}}
{"actor":{"display_login":"caibirdme"}}