{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/dbal/issues/2791","repository_url":"https://api.github.com/repos/doctrine/dbal","labels_url":"https://api.github.com/repos/doctrine/dbal/issues/2791/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/dbal/issues/2791/comments","events_url":"https://api.github.com/repos/doctrine/dbal/issues/2791/events","html_url":"https://github.com/doctrine/dbal/pull/2791","id":245637124,"number":2791,"title":"Add support for more mathematical expressions","user":{"login":"andreasfernandez","id":1787983,"avatar_url":"https://avatars1.githubusercontent.com/u/1787983?v=4","gravatar_id":"","url":"https://api.github.com/users/andreasfernandez","html_url":"https://github.com/andreasfernandez","followers_url":"https://api.github.com/users/andreasfernandez/followers","following_url":"https://api.github.com/users/andreasfernandez/following{/other_user}","gists_url":"https://api.github.com/users/andreasfernandez/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasfernandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasfernandez/subscriptions","organizations_url":"https://api.github.com/users/andreasfernandez/orgs","repos_url":"https://api.github.com/users/andreasfernandez/repos","events_url":"https://api.github.com/users/andreasfernandez/events{/privacy}","received_events_url":"https://api.github.com/users/andreasfernandez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-26T07:58:56Z","updated_at":"2017-07-26T11:10:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/dbal/pulls/2791","html_url":"https://github.com/doctrine/dbal/pull/2791","diff_url":"https://github.com/doctrine/dbal/pull/2791.diff","patch_url":"https://github.com/doctrine/dbal/pull/2791.patch"},"body":"This patch adds support for these math expressions:\r\n\r\n* POWER\r\n* ASIN\r\n* TAN\r\n* ATAN\r\n* RADIANS\r\n* DEGREES\r\n\r\nFixes #2790"},"comment":{"url":"https://api.github.com/repos/doctrine/dbal/issues/comments/318023051","html_url":"https://github.com/doctrine/dbal/pull/2791#issuecomment-318023051","issue_url":"https://api.github.com/repos/doctrine/dbal/issues/2791","id":318023051,"user":{"login":"morozov","id":59683,"avatar_url":"https://avatars1.githubusercontent.com/u/59683?v=4","gravatar_id":"","url":"https://api.github.com/users/morozov","html_url":"https://github.com/morozov","followers_url":"https://api.github.com/users/morozov/followers","following_url":"https://api.github.com/users/morozov/following{/other_user}","gists_url":"https://api.github.com/users/morozov/gists{/gist_id}","starred_url":"https://api.github.com/users/morozov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morozov/subscriptions","organizations_url":"https://api.github.com/users/morozov/orgs","repos_url":"https://api.github.com/users/morozov/repos","events_url":"https://api.github.com/users/morozov/events{/privacy}","received_events_url":"https://api.github.com/users/morozov/received_events","type":"User","site_admin":false},"created_at":"2017-07-26T11:10:49Z","updated_at":"2017-07-26T11:10:49Z","body":"> The original reason I created this patch is that I needed to write a DBAL-compliant radial search. I took [this example](https://developers.google.com/maps/articles/phpsqlsearch_v3#findnearsql) by Google as template for the query and found more mathematical expressions that are missing.\r\n\r\nThe DBAL allows using arbitrary SQL expressions in query parts, and in your example the resulting SQL doesn't depend on the platform. So the query like `$query->select('id', '(3959 * ACOS(…) AS distance')` is DBAL-compliant and portable, and doesn't require any modifications to the DBAL."}}
{"actor":{"display_login":"morozov"}}