{"action":"created","comment":{"url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/comments/31031676","id":31031676,"diff_hunk":"@@ -216,6 +201,33 @@ public function select(Criteria $criteria)\n     }\n \n     /**\n+     * @param array $columns\n+     * @param array $values\n+     *\n+     * @return string\n+     * @throws QueryException\n+     */\n+    private function getDuplicateUpdatedValues(array $columns, array $values)\n+    {\n+        $updates = [];\n+        foreach ($columns as $key => $value) {\n+            if(is_int($key)) {\n+                $updates[] = $value . '=VALUES(' . $value . ')';\n+            } else {\n+                switch($value) {","path":"src/LinguaLeo/MySQL/Query.php","position":39,"original_position":39,"commit_id":"31d286e46bed30873d7467af802115f45bfe6ec8","original_commit_id":"31d286e46bed30873d7467af802115f45bfe6ec8","user":{"login":"regeda","id":199553,"avatar_url":"https://avatars.githubusercontent.com/u/199553?v=3","gravatar_id":"","url":"https://api.github.com/users/regeda","html_url":"https://github.com/regeda","followers_url":"https://api.github.com/users/regeda/followers","following_url":"https://api.github.com/users/regeda/following{/other_user}","gists_url":"https://api.github.com/users/regeda/gists{/gist_id}","starred_url":"https://api.github.com/users/regeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regeda/subscriptions","organizations_url":"https://api.github.com/users/regeda/orgs","repos_url":"https://api.github.com/users/regeda/repos","events_url":"https://api.github.com/users/regeda/events{/privacy}","received_events_url":"https://api.github.com/users/regeda/received_events","type":"User","site_admin":false},"body":"```php\r\nswitch[space]($value) {\r\n```","created_at":"2015-05-26T13:23:36Z","updated_at":"2015-05-26T13:23:36Z","html_url":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6#discussion_r31031676","pull_request_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/comments/31031676"},"html":{"href":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6#discussion_r31031676"},"pull_request":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6","id":36188498,"html_url":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6","diff_url":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6.diff","patch_url":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6.patch","issue_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/6","number":6,"state":"open","locked":false,"title":"increment on upsert support","user":{"login":"mkabischev","id":864369,"avatar_url":"https://avatars.githubusercontent.com/u/864369?v=3","gravatar_id":"","url":"https://api.github.com/users/mkabischev","html_url":"https://github.com/mkabischev","followers_url":"https://api.github.com/users/mkabischev/followers","following_url":"https://api.github.com/users/mkabischev/following{/other_user}","gists_url":"https://api.github.com/users/mkabischev/gists{/gist_id}","starred_url":"https://api.github.com/users/mkabischev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkabischev/subscriptions","organizations_url":"https://api.github.com/users/mkabischev/orgs","repos_url":"https://api.github.com/users/mkabischev/repos","events_url":"https://api.github.com/users/mkabischev/events{/privacy}","received_events_url":"https://api.github.com/users/mkabischev/received_events","type":"User","site_admin":false},"body":"В LinguaLeo/php-dataquery#3 добавил возможность задать режим работы upsert`a.","created_at":"2015-05-26T10:25:17Z","updated_at":"2015-05-26T13:23:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74c5a8f8ae3cdd9ed1ecf6eb0d0577135519ba84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6/commits","review_comments_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6/comments","review_comment_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/6/comments","statuses_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/statuses/31d286e46bed30873d7467af802115f45bfe6ec8","head":{"label":"LinguaLeo:insert-increment","ref":"insert-increment","sha":"31d286e46bed30873d7467af802115f45bfe6ec8","user":{"login":"LinguaLeo","id":1955942,"avatar_url":"https://avatars.githubusercontent.com/u/1955942?v=3","gravatar_id":"","url":"https://api.github.com/users/LinguaLeo","html_url":"https://github.com/LinguaLeo","followers_url":"https://api.github.com/users/LinguaLeo/followers","following_url":"https://api.github.com/users/LinguaLeo/following{/other_user}","gists_url":"https://api.github.com/users/LinguaLeo/gists{/gist_id}","starred_url":"https://api.github.com/users/LinguaLeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinguaLeo/subscriptions","organizations_url":"https://api.github.com/users/LinguaLeo/orgs","repos_url":"https://api.github.com/users/LinguaLeo/repos","events_url":"https://api.github.com/users/LinguaLeo/events{/privacy}","received_events_url":"https://api.github.com/users/LinguaLeo/received_events","type":"Organization","site_admin":false},"repo":{"id":17050835,"name":"php-dataquery-mysql","full_name":"LinguaLeo/php-dataquery-mysql","owner":{"login":"LinguaLeo","id":1955942,"avatar_url":"https://avatars.githubusercontent.com/u/1955942?v=3","gravatar_id":"","url":"https://api.github.com/users/LinguaLeo","html_url":"https://github.com/LinguaLeo","followers_url":"https://api.github.com/users/LinguaLeo/followers","following_url":"https://api.github.com/users/LinguaLeo/following{/other_user}","gists_url":"https://api.github.com/users/LinguaLeo/gists{/gist_id}","starred_url":"https://api.github.com/users/LinguaLeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinguaLeo/subscriptions","organizations_url":"https://api.github.com/users/LinguaLeo/orgs","repos_url":"https://api.github.com/users/LinguaLeo/repos","events_url":"https://api.github.com/users/LinguaLeo/events{/privacy}","received_events_url":"https://api.github.com/users/LinguaLeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LinguaLeo/php-dataquery-mysql","description":"","fork":false,"url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql","forks_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/forks","keys_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/teams","hooks_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/hooks","issue_events_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/events{/number}","events_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/events","assignees_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/assignees{/user}","branches_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/branches{/branch}","tags_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/tags","blobs_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/languages","stargazers_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/stargazers","contributors_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/contributors","subscribers_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/subscribers","subscription_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/subscription","commits_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/contents/{+path}","compare_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/merges","archive_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/downloads","issues_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues{/number}","pulls_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/labels{/name}","releases_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/releases{/id}","created_at":"2014-02-21T09:04:36Z","updated_at":"2015-05-07T15:03:59Z","pushed_at":"2015-05-26T13:21:10Z","git_url":"git://github.com/LinguaLeo/php-dataquery-mysql.git","ssh_url":"git@github.com:LinguaLeo/php-dataquery-mysql.git","clone_url":"https://github.com/LinguaLeo/php-dataquery-mysql.git","svn_url":"https://github.com/LinguaLeo/php-dataquery-mysql","homepage":null,"size":248,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"LinguaLeo:master","ref":"master","sha":"949af0c9a74161257ab985dc6b21c15d53a48328","user":{"login":"LinguaLeo","id":1955942,"avatar_url":"https://avatars.githubusercontent.com/u/1955942?v=3","gravatar_id":"","url":"https://api.github.com/users/LinguaLeo","html_url":"https://github.com/LinguaLeo","followers_url":"https://api.github.com/users/LinguaLeo/followers","following_url":"https://api.github.com/users/LinguaLeo/following{/other_user}","gists_url":"https://api.github.com/users/LinguaLeo/gists{/gist_id}","starred_url":"https://api.github.com/users/LinguaLeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinguaLeo/subscriptions","organizations_url":"https://api.github.com/users/LinguaLeo/orgs","repos_url":"https://api.github.com/users/LinguaLeo/repos","events_url":"https://api.github.com/users/LinguaLeo/events{/privacy}","received_events_url":"https://api.github.com/users/LinguaLeo/received_events","type":"Organization","site_admin":false},"repo":{"id":17050835,"name":"php-dataquery-mysql","full_name":"LinguaLeo/php-dataquery-mysql","owner":{"login":"LinguaLeo","id":1955942,"avatar_url":"https://avatars.githubusercontent.com/u/1955942?v=3","gravatar_id":"","url":"https://api.github.com/users/LinguaLeo","html_url":"https://github.com/LinguaLeo","followers_url":"https://api.github.com/users/LinguaLeo/followers","following_url":"https://api.github.com/users/LinguaLeo/following{/other_user}","gists_url":"https://api.github.com/users/LinguaLeo/gists{/gist_id}","starred_url":"https://api.github.com/users/LinguaLeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinguaLeo/subscriptions","organizations_url":"https://api.github.com/users/LinguaLeo/orgs","repos_url":"https://api.github.com/users/LinguaLeo/repos","events_url":"https://api.github.com/users/LinguaLeo/events{/privacy}","received_events_url":"https://api.github.com/users/LinguaLeo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LinguaLeo/php-dataquery-mysql","description":"","fork":false,"url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql","forks_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/forks","keys_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/teams","hooks_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/hooks","issue_events_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/events{/number}","events_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/events","assignees_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/assignees{/user}","branches_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/branches{/branch}","tags_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/tags","blobs_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/statuses/{sha}","languages_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/languages","stargazers_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/stargazers","contributors_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/contributors","subscribers_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/subscribers","subscription_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/subscription","commits_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/contents/{+path}","compare_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/merges","archive_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/downloads","issues_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues{/number}","pulls_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls{/number}","milestones_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/milestones{/number}","notifications_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/labels{/name}","releases_url":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/releases{/id}","created_at":"2014-02-21T09:04:36Z","updated_at":"2015-05-07T15:03:59Z","pushed_at":"2015-05-26T13:21:10Z","git_url":"git://github.com/LinguaLeo/php-dataquery-mysql.git","ssh_url":"git@github.com:LinguaLeo/php-dataquery-mysql.git","clone_url":"https://github.com/LinguaLeo/php-dataquery-mysql.git","svn_url":"https://github.com/LinguaLeo/php-dataquery-mysql","homepage":null,"size":248,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6"},"html":{"href":"https://github.com/LinguaLeo/php-dataquery-mysql/pull/6"},"issue":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/6"},"comments":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/LinguaLeo/php-dataquery-mysql/statuses/31d286e46bed30873d7467af802115f45bfe6ec8"}}}}