{"action":"created","comment":{"url":"https://api.github.com/repos/nette/database/pulls/comments/33427006","id":33427006,"diff_hunk":"@@ -227,6 +227,18 @@ public function fetch()\n \n \n \t/**\n+\t * Fetches single field.\n+\t * @param  int\n+\t * @return mixed|FALSE\n+\t */\n+\tpublic function fetchField($column = 0)\n+\t{\n+\t\t$row = $this->fetch();","path":"src/Database/Table/Selection.php","position":10,"original_position":10,"commit_id":"885ad2a3459de2bdd991b6b9398597714cf7c4b7","original_commit_id":"885ad2a3459de2bdd991b6b9398597714cf7c4b7","user":{"login":"foxycode","id":1284781,"avatar_url":"https://avatars.githubusercontent.com/u/1284781?v=3","gravatar_id":"","url":"https://api.github.com/users/foxycode","html_url":"https://github.com/foxycode","followers_url":"https://api.github.com/users/foxycode/followers","following_url":"https://api.github.com/users/foxycode/following{/other_user}","gists_url":"https://api.github.com/users/foxycode/gists{/gist_id}","starred_url":"https://api.github.com/users/foxycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxycode/subscriptions","organizations_url":"https://api.github.com/users/foxycode/orgs","repos_url":"https://api.github.com/users/foxycode/repos","events_url":"https://api.github.com/users/foxycode/events{/privacy}","received_events_url":"https://api.github.com/users/foxycode/received_events","type":"User","site_admin":false},"body":"Makes sense, but shouldn't be then select added to `fetchPairs` too? And it will probably not work for int column key which is default for `fetchField` function.","created_at":"2015-06-28T21:07:31Z","updated_at":"2015-06-28T21:07:31Z","html_url":"https://github.com/nette/database/pull/74#discussion_r33427006","pull_request_url":"https://api.github.com/repos/nette/database/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/nette/database/pulls/comments/33427006"},"html":{"href":"https://github.com/nette/database/pull/74#discussion_r33427006"},"pull_request":{"href":"https://api.github.com/repos/nette/database/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/nette/database/pulls/74","id":38724305,"html_url":"https://github.com/nette/database/pull/74","diff_url":"https://github.com/nette/database/pull/74.diff","patch_url":"https://github.com/nette/database/pull/74.patch","issue_url":"https://api.github.com/repos/nette/database/issues/74","number":74,"state":"open","locked":false,"title":"Added fetchField function to Selection","user":{"login":"foxycode","id":1284781,"avatar_url":"https://avatars.githubusercontent.com/u/1284781?v=3","gravatar_id":"","url":"https://api.github.com/users/foxycode","html_url":"https://github.com/foxycode","followers_url":"https://api.github.com/users/foxycode/followers","following_url":"https://api.github.com/users/foxycode/following{/other_user}","gists_url":"https://api.github.com/users/foxycode/gists{/gist_id}","starred_url":"https://api.github.com/users/foxycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxycode/subscriptions","organizations_url":"https://api.github.com/users/foxycode/orgs","repos_url":"https://api.github.com/users/foxycode/repos","events_url":"https://api.github.com/users/foxycode/events{/privacy}","received_events_url":"https://api.github.com/users/foxycode/received_events","type":"User","site_admin":false},"body":"I don't understand why `fetchField` wasn't added to `Selection` earlier. I am missing it here every day. Hope this will be accepted.\r\n\r\nI wanted to create some tests for Selection too, but I can't get existing tests running. Testers show me this: http://i.imgur.com/13EzLhg.png But I am sure that I have pdo installed and enabled.","created_at":"2015-06-28T11:59:53Z","updated_at":"2015-06-28T21:07:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7dfb2417d00363274284cf8f28398d702c572a24","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nette/database/pulls/74/commits","review_comments_url":"https://api.github.com/repos/nette/database/pulls/74/comments","review_comment_url":"https://api.github.com/repos/nette/database/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nette/database/issues/74/comments","statuses_url":"https://api.github.com/repos/nette/database/statuses/885ad2a3459de2bdd991b6b9398597714cf7c4b7","head":{"label":"foxycode:master","ref":"master","sha":"885ad2a3459de2bdd991b6b9398597714cf7c4b7","user":{"login":"foxycode","id":1284781,"avatar_url":"https://avatars.githubusercontent.com/u/1284781?v=3","gravatar_id":"","url":"https://api.github.com/users/foxycode","html_url":"https://github.com/foxycode","followers_url":"https://api.github.com/users/foxycode/followers","following_url":"https://api.github.com/users/foxycode/following{/other_user}","gists_url":"https://api.github.com/users/foxycode/gists{/gist_id}","starred_url":"https://api.github.com/users/foxycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxycode/subscriptions","organizations_url":"https://api.github.com/users/foxycode/orgs","repos_url":"https://api.github.com/users/foxycode/repos","events_url":"https://api.github.com/users/foxycode/events{/privacy}","received_events_url":"https://api.github.com/users/foxycode/received_events","type":"User","site_admin":false},"repo":{"id":38196432,"name":"nette-database","full_name":"foxycode/nette-database","owner":{"login":"foxycode","id":1284781,"avatar_url":"https://avatars.githubusercontent.com/u/1284781?v=3","gravatar_id":"","url":"https://api.github.com/users/foxycode","html_url":"https://github.com/foxycode","followers_url":"https://api.github.com/users/foxycode/followers","following_url":"https://api.github.com/users/foxycode/following{/other_user}","gists_url":"https://api.github.com/users/foxycode/gists{/gist_id}","starred_url":"https://api.github.com/users/foxycode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxycode/subscriptions","organizations_url":"https://api.github.com/users/foxycode/orgs","repos_url":"https://api.github.com/users/foxycode/repos","events_url":"https://api.github.com/users/foxycode/events{/privacy}","received_events_url":"https://api.github.com/users/foxycode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxycode/nette-database","description":"Nette Database layer","fork":true,"url":"https://api.github.com/repos/foxycode/nette-database","forks_url":"https://api.github.com/repos/foxycode/nette-database/forks","keys_url":"https://api.github.com/repos/foxycode/nette-database/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxycode/nette-database/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxycode/nette-database/teams","hooks_url":"https://api.github.com/repos/foxycode/nette-database/hooks","issue_events_url":"https://api.github.com/repos/foxycode/nette-database/issues/events{/number}","events_url":"https://api.github.com/repos/foxycode/nette-database/events","assignees_url":"https://api.github.com/repos/foxycode/nette-database/assignees{/user}","branches_url":"https://api.github.com/repos/foxycode/nette-database/branches{/branch}","tags_url":"https://api.github.com/repos/foxycode/nette-database/tags","blobs_url":"https://api.github.com/repos/foxycode/nette-database/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxycode/nette-database/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxycode/nette-database/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxycode/nette-database/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxycode/nette-database/statuses/{sha}","languages_url":"https://api.github.com/repos/foxycode/nette-database/languages","stargazers_url":"https://api.github.com/repos/foxycode/nette-database/stargazers","contributors_url":"https://api.github.com/repos/foxycode/nette-database/contributors","subscribers_url":"https://api.github.com/repos/foxycode/nette-database/subscribers","subscription_url":"https://api.github.com/repos/foxycode/nette-database/subscription","commits_url":"https://api.github.com/repos/foxycode/nette-database/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxycode/nette-database/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxycode/nette-database/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxycode/nette-database/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxycode/nette-database/contents/{+path}","compare_url":"https://api.github.com/repos/foxycode/nette-database/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxycode/nette-database/merges","archive_url":"https://api.github.com/repos/foxycode/nette-database/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxycode/nette-database/downloads","issues_url":"https://api.github.com/repos/foxycode/nette-database/issues{/number}","pulls_url":"https://api.github.com/repos/foxycode/nette-database/pulls{/number}","milestones_url":"https://api.github.com/repos/foxycode/nette-database/milestones{/number}","notifications_url":"https://api.github.com/repos/foxycode/nette-database/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxycode/nette-database/labels{/name}","releases_url":"https://api.github.com/repos/foxycode/nette-database/releases{/id}","created_at":"2015-06-28T11:28:10Z","updated_at":"2015-06-28T11:28:36Z","pushed_at":"2015-06-28T11:56:46Z","git_url":"git://github.com/foxycode/nette-database.git","ssh_url":"git@github.com:foxycode/nette-database.git","clone_url":"https://github.com/foxycode/nette-database.git","svn_url":"https://github.com/foxycode/nette-database","homepage":"http://nette.org","size":2170,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nette:master","ref":"master","sha":"7194522e29889f5276f8578526969c2c14e200b7","user":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"repo":{"id":17713908,"name":"database","full_name":"nette/database","owner":{"login":"nette","id":99965,"avatar_url":"https://avatars.githubusercontent.com/u/99965?v=3","gravatar_id":"","url":"https://api.github.com/users/nette","html_url":"https://github.com/nette","followers_url":"https://api.github.com/users/nette/followers","following_url":"https://api.github.com/users/nette/following{/other_user}","gists_url":"https://api.github.com/users/nette/gists{/gist_id}","starred_url":"https://api.github.com/users/nette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nette/subscriptions","organizations_url":"https://api.github.com/users/nette/orgs","repos_url":"https://api.github.com/users/nette/repos","events_url":"https://api.github.com/users/nette/events{/privacy}","received_events_url":"https://api.github.com/users/nette/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nette/database","description":"Nette Database layer","fork":false,"url":"https://api.github.com/repos/nette/database","forks_url":"https://api.github.com/repos/nette/database/forks","keys_url":"https://api.github.com/repos/nette/database/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nette/database/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nette/database/teams","hooks_url":"https://api.github.com/repos/nette/database/hooks","issue_events_url":"https://api.github.com/repos/nette/database/issues/events{/number}","events_url":"https://api.github.com/repos/nette/database/events","assignees_url":"https://api.github.com/repos/nette/database/assignees{/user}","branches_url":"https://api.github.com/repos/nette/database/branches{/branch}","tags_url":"https://api.github.com/repos/nette/database/tags","blobs_url":"https://api.github.com/repos/nette/database/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nette/database/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nette/database/git/refs{/sha}","trees_url":"https://api.github.com/repos/nette/database/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nette/database/statuses/{sha}","languages_url":"https://api.github.com/repos/nette/database/languages","stargazers_url":"https://api.github.com/repos/nette/database/stargazers","contributors_url":"https://api.github.com/repos/nette/database/contributors","subscribers_url":"https://api.github.com/repos/nette/database/subscribers","subscription_url":"https://api.github.com/repos/nette/database/subscription","commits_url":"https://api.github.com/repos/nette/database/commits{/sha}","git_commits_url":"https://api.github.com/repos/nette/database/git/commits{/sha}","comments_url":"https://api.github.com/repos/nette/database/comments{/number}","issue_comment_url":"https://api.github.com/repos/nette/database/issues/comments{/number}","contents_url":"https://api.github.com/repos/nette/database/contents/{+path}","compare_url":"https://api.github.com/repos/nette/database/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nette/database/merges","archive_url":"https://api.github.com/repos/nette/database/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nette/database/downloads","issues_url":"https://api.github.com/repos/nette/database/issues{/number}","pulls_url":"https://api.github.com/repos/nette/database/pulls{/number}","milestones_url":"https://api.github.com/repos/nette/database/milestones{/number}","notifications_url":"https://api.github.com/repos/nette/database/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nette/database/labels{/name}","releases_url":"https://api.github.com/repos/nette/database/releases{/id}","created_at":"2014-03-13T15:00:28Z","updated_at":"2015-06-23T08:39:50Z","pushed_at":"2015-06-28T11:59:54Z","git_url":"git://github.com/nette/database.git","ssh_url":"git@github.com:nette/database.git","clone_url":"https://github.com/nette/database.git","svn_url":"https://github.com/nette/database","homepage":"http://nette.org","size":2170,"stargazers_count":62,"watchers_count":62,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":19,"forks":39,"open_issues":19,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nette/database/pulls/74"},"html":{"href":"https://github.com/nette/database/pull/74"},"issue":{"href":"https://api.github.com/repos/nette/database/issues/74"},"comments":{"href":"https://api.github.com/repos/nette/database/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/nette/database/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/nette/database/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nette/database/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/nette/database/statuses/885ad2a3459de2bdd991b6b9398597714cf7c4b7"}}}}