{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/1089","labels_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1089/comments","events_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1089/events","html_url":"https://github.com/elixir-lang/ecto/issues/1089","id":117359529,"number":1089,"title":"Fragment interpolation and sigil questions","user":{"login":"parkerl","id":450084,"avatar_url":"https://avatars.githubusercontent.com/u/450084?v=3","gravatar_id":"","url":"https://api.github.com/users/parkerl","html_url":"https://github.com/parkerl","followers_url":"https://api.github.com/users/parkerl/followers","following_url":"https://api.github.com/users/parkerl/following{/other_user}","gists_url":"https://api.github.com/users/parkerl/gists{/gist_id}","starred_url":"https://api.github.com/users/parkerl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkerl/subscriptions","organizations_url":"https://api.github.com/users/parkerl/orgs","repos_url":"https://api.github.com/users/parkerl/repos","events_url":"https://api.github.com/users/parkerl/events{/privacy}","received_events_url":"https://api.github.com/users/parkerl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-17T13:59:35Z","updated_at":"2015-11-18T01:05:57Z","closed_at":null,"body":"I have been playing around with fragments after a few questions came up on Slack. Queries using `fragment` fail to compile with either of the following:\r\n\r\nInterpolation with a variable.\r\n```\r\n    clause = \"1 = ?\"\r\n    from p in \"posts\", where: fragment(^clause, 1)\r\n```\r\n\r\nWith a sigil.\r\n```\r\n    from p in \"posts\", where: fragment(~S|1 = 1|)\r\n```\r\n\r\nConfusingly, an interpolated value with no variables does compile. However, neither the Postgres or MySQL adapter will allow interpolated values in fragments.\r\n\r\n```\r\n      clause = \"1 = ?\"\r\n      from p in \"posts\", where: fragment(^clause)\r\n```\r\n\r\nShould either of the top two be supported? \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elixir-lang/ecto/issues/comments/157564460","html_url":"https://github.com/elixir-lang/ecto/issues/1089#issuecomment-157564460","issue_url":"https://api.github.com/repos/elixir-lang/ecto/issues/1089","id":157564460,"user":{"login":"parkerl","id":450084,"avatar_url":"https://avatars.githubusercontent.com/u/450084?v=3","gravatar_id":"","url":"https://api.github.com/users/parkerl","html_url":"https://github.com/parkerl","followers_url":"https://api.github.com/users/parkerl/followers","following_url":"https://api.github.com/users/parkerl/following{/other_user}","gists_url":"https://api.github.com/users/parkerl/gists{/gist_id}","starred_url":"https://api.github.com/users/parkerl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkerl/subscriptions","organizations_url":"https://api.github.com/users/parkerl/orgs","repos_url":"https://api.github.com/users/parkerl/repos","events_url":"https://api.github.com/users/parkerl/events{/privacy}","received_events_url":"https://api.github.com/users/parkerl/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T01:05:57Z","updated_at":"2015-11-18T01:05:57Z","body":"@josevalim great. I will get on this as soon as I can."}}