{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/12553","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12553/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12553/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12553/events","html_url":"https://github.com/phalcon/cphalcon/issues/12553","id":201080286,"number":12553,"title":"Allow overriding getSqlExpression* in an extended Dialect","user":{"login":"nsossonko","id":8125151,"avatar_url":"https://avatars1.githubusercontent.com/u/8125151?v=4","gravatar_id":"","url":"https://api.github.com/users/nsossonko","html_url":"https://github.com/nsossonko","followers_url":"https://api.github.com/users/nsossonko/followers","following_url":"https://api.github.com/users/nsossonko/following{/other_user}","gists_url":"https://api.github.com/users/nsossonko/gists{/gist_id}","starred_url":"https://api.github.com/users/nsossonko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsossonko/subscriptions","organizations_url":"https://api.github.com/users/nsossonko/orgs","repos_url":"https://api.github.com/users/nsossonko/repos","events_url":"https://api.github.com/users/nsossonko/events{/privacy}","received_events_url":"https://api.github.com/users/nsossonko/received_events","type":"User","site_admin":false},"labels":[{"id":13573146,"url":"https://api.github.com/repos/phalcon/cphalcon/labels/New%20Feature%20Request","name":"New Feature Request","color":"0052cc","default":false},{"id":903580634,"url":"https://api.github.com/repos/phalcon/cphalcon/labels/stale","name":"stale","color":"ffffff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-16T17:35:07Z","updated_at":"2018-04-17T13:36:50Z","closed_at":"2018-04-16T21:30:20Z","author_association":"CONTRIBUTOR","body":"Currently most (or all?) of the getSqlExpression* methods in https://github.com/phalcon/cphalcon/blob/master/phalcon/db/dialect.zep are marked as final, which means they can't be overriden. I'd like to be able to extend the Mysql dialect and override, for example, getSqlExpressionFrom. My use case is simple: I need to use index hinting because mysql is not being smart about which index to use, so I'd like to inject it in the query, like so:\r\n\r\n```php\r\npublic function getSqlExpressionFrom($expression, string $escapeChar = null) {\r\n  $sql = parent::getSqlExpressionFrom($expression, $escapeChar);\r\n  if ($this->_indexHint) {\r\n    $sql .= \" USE INDEX (`{$this->_indexHint}`)\";\r\n  }\r\n  return $sql;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/381994924","html_url":"https://github.com/phalcon/cphalcon/issues/12553#issuecomment-381994924","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/12553","id":381994924,"user":{"login":"nsossonko","id":8125151,"avatar_url":"https://avatars1.githubusercontent.com/u/8125151?v=4","gravatar_id":"","url":"https://api.github.com/users/nsossonko","html_url":"https://github.com/nsossonko","followers_url":"https://api.github.com/users/nsossonko/followers","following_url":"https://api.github.com/users/nsossonko/following{/other_user}","gists_url":"https://api.github.com/users/nsossonko/gists{/gist_id}","starred_url":"https://api.github.com/users/nsossonko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsossonko/subscriptions","organizations_url":"https://api.github.com/users/nsossonko/orgs","repos_url":"https://api.github.com/users/nsossonko/repos","events_url":"https://api.github.com/users/nsossonko/events{/privacy}","received_events_url":"https://api.github.com/users/nsossonko/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T13:36:50Z","updated_at":"2018-04-17T13:36:50Z","author_association":"CONTRIBUTOR","body":"I don't think this was ever implemented"}}
{"actor":{"display_login":"nsossonko"}}