{"action":"created","comment":{"url":"https://api.github.com/repos/aces/Loris-MRI/pulls/comments/185087543","pull_request_review_id":116409677,"id":185087543,"diff_hunk":"@@ -0,0 +1,141 @@\n+# NAME\n+\n+NeuroDB::Database -- Provides a set of methods to run SQL statements on a database\n+\n+# SYNOPSIS\n+\n+    use NeuroDB::Database;\n+    use TryCatch;\n+\n+    my $db = NeuroDB::Database->new(\n+        userName     => 'user',\n+        databaseName => 'my_db',\n+        hostName     => 'my_hostname',\n+        password     => 'pwd'\n+    );\n+\n+    try {\n+        $db->connect();\n+    } catch(NeuroDB::DatabaseException $e) {\n+        die sprintf(\n+            \"User %s failed to connect to %s on %s: %s (error code %d)\\n\",\n+            'user',\n+            'my_db',\n+            'my_hostname',\n+            $e->errorMessage,\n+            $e->errorCode\n+        );\n+    }\n+\n+    .\n+    .\n+    .\n+\n+    try {\n+        $db->pselect(\n+            'SELECT * FROM candidate WHERE pscid = ?', 'MTL135'\n+        );\n+    } catch(NeuroDB::DatabaseException $e) {\n+        die sprintf(\n+            \"SELECT on candidate table failed: %s (error code=%d)\",\n+            $e->errorMessage,\n+            $e->errorCode\n+        );\n+    }\n+\n+# DESCRIPTION\n+\n+This class provides the basic SELECT, INSERT, UPDATE and DELETE methods\n+for all object brokers. The methods of this class should only be used by\n+the object brokers themselves (except 'new' for creating a new database\n+instance and 'connect'). Scripts and 'non-broker' classes that need access\n+to the database should rely on an appropriate object broker class to handle\n+the requests.\n+\n+## Methods\n+\n+### `new(userName => $u, databaseName => $d, hostname => $h, password => $pwd, port =>$port)`  (constructor)\n+\n+Create a new instance of this class, without actually trying to connect\n+to the database specified. All parameters are required except 'port', which\n+defaults to 3306 if not specified. If the user name, database name or host\n+name are the empty string, the constructor will call `die`.\n+\n+INPUTS: a set of properties for the current database:\n+\n+\\- name of the user for the (upcoming) connection","path":"docs/scripts_md/Database.md","position":66,"original_position":66,"commit_id":"4c50d05e438788df9f7bbe73a7cb084b7c56f38b","original_commit_id":"4c50d05e438788df9f7bbe73a7cb084b7c56f38b","user":{"login":"nicolasbrossard","id":6844033,"avatar_url":"https://avatars0.githubusercontent.com/u/6844033?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasbrossard","html_url":"https://github.com/nicolasbrossard","followers_url":"https://api.github.com/users/nicolasbrossard/followers","following_url":"https://api.github.com/users/nicolasbrossard/following{/other_user}","gists_url":"https://api.github.com/users/nicolasbrossard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasbrossard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasbrossard/subscriptions","organizations_url":"https://api.github.com/users/nicolasbrossard/orgs","repos_url":"https://api.github.com/users/nicolasbrossard/repos","events_url":"https://api.github.com/users/nicolasbrossard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasbrossard/received_events","type":"User","site_admin":false},"body":"Corrected","created_at":"2018-04-30T19:39:04Z","updated_at":"2018-04-30T19:39:04Z","html_url":"https://github.com/aces/Loris-MRI/pull/303#discussion_r185087543","pull_request_url":"https://api.github.com/repos/aces/Loris-MRI/pulls/303","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/comments/185087543"},"html":{"href":"https://github.com/aces/Loris-MRI/pull/303#discussion_r185087543"},"pull_request":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/303"}},"in_reply_to_id":185036435},"pull_request":{"url":"https://api.github.com/repos/aces/Loris-MRI/pulls/303","id":184666710,"html_url":"https://github.com/aces/Loris-MRI/pull/303","diff_url":"https://github.com/aces/Loris-MRI/pull/303.diff","patch_url":"https://github.com/aces/Loris-MRI/pull/303.patch","issue_url":"https://api.github.com/repos/aces/Loris-MRI/issues/303","number":303,"state":"open","locked":false,"title":"Update Pelr doc for new database framework","user":{"login":"nicolasbrossard","id":6844033,"avatar_url":"https://avatars0.githubusercontent.com/u/6844033?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasbrossard","html_url":"https://github.com/nicolasbrossard","followers_url":"https://api.github.com/users/nicolasbrossard/followers","following_url":"https://api.github.com/users/nicolasbrossard/following{/other_user}","gists_url":"https://api.github.com/users/nicolasbrossard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasbrossard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasbrossard/subscriptions","organizations_url":"https://api.github.com/users/nicolasbrossard/orgs","repos_url":"https://api.github.com/users/nicolasbrossard/repos","events_url":"https://api.github.com/users/nicolasbrossard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasbrossard/received_events","type":"User","site_admin":false},"body":"This PR corrects the documentation errors found when merging minor into major and also adds the markdown files for the new database framework.","created_at":"2018-04-27T16:14:30Z","updated_at":"2018-04-30T19:39:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a813007e4a4f89ff6b9cee27ce6310ec7efdfefd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":838200548,"url":"https://api.github.com/repos/aces/Loris-MRI/labels/Documentation","name":"Documentation","color":"22afe2","default":false},{"id":717896135,"url":"https://api.github.com/repos/aces/Loris-MRI/labels/[branch]%20major","name":"[branch] major","color":"4d3319","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/aces/Loris-MRI/pulls/303/commits","review_comments_url":"https://api.github.com/repos/aces/Loris-MRI/pulls/303/comments","review_comment_url":"https://api.github.com/repos/aces/Loris-MRI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aces/Loris-MRI/issues/303/comments","statuses_url":"https://api.github.com/repos/aces/Loris-MRI/statuses/4c50d05e438788df9f7bbe73a7cb084b7c56f38b","head":{"label":"nicolasbrossard:doc_for_database_framework","ref":"doc_for_database_framework","sha":"4c50d05e438788df9f7bbe73a7cb084b7c56f38b","user":{"login":"nicolasbrossard","id":6844033,"avatar_url":"https://avatars0.githubusercontent.com/u/6844033?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasbrossard","html_url":"https://github.com/nicolasbrossard","followers_url":"https://api.github.com/users/nicolasbrossard/followers","following_url":"https://api.github.com/users/nicolasbrossard/following{/other_user}","gists_url":"https://api.github.com/users/nicolasbrossard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasbrossard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasbrossard/subscriptions","organizations_url":"https://api.github.com/users/nicolasbrossard/orgs","repos_url":"https://api.github.com/users/nicolasbrossard/repos","events_url":"https://api.github.com/users/nicolasbrossard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasbrossard/received_events","type":"User","site_admin":false},"repo":{"id":28104729,"name":"Loris-MRI","full_name":"nicolasbrossard/Loris-MRI","owner":{"login":"nicolasbrossard","id":6844033,"avatar_url":"https://avatars0.githubusercontent.com/u/6844033?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolasbrossard","html_url":"https://github.com/nicolasbrossard","followers_url":"https://api.github.com/users/nicolasbrossard/followers","following_url":"https://api.github.com/users/nicolasbrossard/following{/other_user}","gists_url":"https://api.github.com/users/nicolasbrossard/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasbrossard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasbrossard/subscriptions","organizations_url":"https://api.github.com/users/nicolasbrossard/orgs","repos_url":"https://api.github.com/users/nicolasbrossard/repos","events_url":"https://api.github.com/users/nicolasbrossard/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasbrossard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolasbrossard/Loris-MRI","description":"The set of scripts that preprocess and insert MRI data into the database.","fork":true,"url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI","forks_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/forks","keys_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/teams","hooks_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/hooks","issue_events_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/issues/events{/number}","events_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/events","assignees_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/assignees{/user}","branches_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/branches{/branch}","tags_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/tags","blobs_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/languages","stargazers_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/stargazers","contributors_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/contributors","subscribers_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/subscribers","subscription_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/subscription","commits_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/contents/{+path}","compare_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/merges","archive_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/downloads","issues_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/issues{/number}","pulls_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/labels{/name}","releases_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/releases{/id}","deployments_url":"https://api.github.com/repos/nicolasbrossard/Loris-MRI/deployments","created_at":"2014-12-16T20:17:03Z","updated_at":"2017-11-27T17:22:22Z","pushed_at":"2018-04-27T16:13:19Z","git_url":"git://github.com/nicolasbrossard/Loris-MRI.git","ssh_url":"git@github.com:nicolasbrossard/Loris-MRI.git","clone_url":"https://github.com/nicolasbrossard/Loris-MRI.git","svn_url":"https://github.com/nicolasbrossard/Loris-MRI","homepage":"","size":2636,"stargazers_count":0,"watchers_count":0,"language":"Perl","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aces:major","ref":"major","sha":"3a4877f1bbac587b7895a97c19d99072c86baadf","user":{"login":"aces","id":472868,"avatar_url":"https://avatars2.githubusercontent.com/u/472868?v=4","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"repo":{"id":2728966,"name":"Loris-MRI","full_name":"aces/Loris-MRI","owner":{"login":"aces","id":472868,"avatar_url":"https://avatars2.githubusercontent.com/u/472868?v=4","gravatar_id":"","url":"https://api.github.com/users/aces","html_url":"https://github.com/aces","followers_url":"https://api.github.com/users/aces/followers","following_url":"https://api.github.com/users/aces/following{/other_user}","gists_url":"https://api.github.com/users/aces/gists{/gist_id}","starred_url":"https://api.github.com/users/aces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aces/subscriptions","organizations_url":"https://api.github.com/users/aces/orgs","repos_url":"https://api.github.com/users/aces/repos","events_url":"https://api.github.com/users/aces/events{/privacy}","received_events_url":"https://api.github.com/users/aces/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aces/Loris-MRI","description":"The set of scripts that preprocess and insert MRI data into the database.","fork":false,"url":"https://api.github.com/repos/aces/Loris-MRI","forks_url":"https://api.github.com/repos/aces/Loris-MRI/forks","keys_url":"https://api.github.com/repos/aces/Loris-MRI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aces/Loris-MRI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aces/Loris-MRI/teams","hooks_url":"https://api.github.com/repos/aces/Loris-MRI/hooks","issue_events_url":"https://api.github.com/repos/aces/Loris-MRI/issues/events{/number}","events_url":"https://api.github.com/repos/aces/Loris-MRI/events","assignees_url":"https://api.github.com/repos/aces/Loris-MRI/assignees{/user}","branches_url":"https://api.github.com/repos/aces/Loris-MRI/branches{/branch}","tags_url":"https://api.github.com/repos/aces/Loris-MRI/tags","blobs_url":"https://api.github.com/repos/aces/Loris-MRI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aces/Loris-MRI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aces/Loris-MRI/git/refs{/sha}","trees_url":"https://api.github.com/repos/aces/Loris-MRI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aces/Loris-MRI/statuses/{sha}","languages_url":"https://api.github.com/repos/aces/Loris-MRI/languages","stargazers_url":"https://api.github.com/repos/aces/Loris-MRI/stargazers","contributors_url":"https://api.github.com/repos/aces/Loris-MRI/contributors","subscribers_url":"https://api.github.com/repos/aces/Loris-MRI/subscribers","subscription_url":"https://api.github.com/repos/aces/Loris-MRI/subscription","commits_url":"https://api.github.com/repos/aces/Loris-MRI/commits{/sha}","git_commits_url":"https://api.github.com/repos/aces/Loris-MRI/git/commits{/sha}","comments_url":"https://api.github.com/repos/aces/Loris-MRI/comments{/number}","issue_comment_url":"https://api.github.com/repos/aces/Loris-MRI/issues/comments{/number}","contents_url":"https://api.github.com/repos/aces/Loris-MRI/contents/{+path}","compare_url":"https://api.github.com/repos/aces/Loris-MRI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aces/Loris-MRI/merges","archive_url":"https://api.github.com/repos/aces/Loris-MRI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aces/Loris-MRI/downloads","issues_url":"https://api.github.com/repos/aces/Loris-MRI/issues{/number}","pulls_url":"https://api.github.com/repos/aces/Loris-MRI/pulls{/number}","milestones_url":"https://api.github.com/repos/aces/Loris-MRI/milestones{/number}","notifications_url":"https://api.github.com/repos/aces/Loris-MRI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aces/Loris-MRI/labels{/name}","releases_url":"https://api.github.com/repos/aces/Loris-MRI/releases{/id}","deployments_url":"https://api.github.com/repos/aces/Loris-MRI/deployments","created_at":"2011-11-07T20:19:37Z","updated_at":"2018-04-24T20:36:34Z","pushed_at":"2018-04-27T16:14:31Z","git_url":"git://github.com/aces/Loris-MRI.git","ssh_url":"git@github.com:aces/Loris-MRI.git","clone_url":"https://github.com/aces/Loris-MRI.git","svn_url":"https://github.com/aces/Loris-MRI","homepage":"","size":2582,"stargazers_count":6,"watchers_count":6,"language":"Perl","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":27,"license":null,"forks":28,"open_issues":27,"watchers":6,"default_branch":"minor"}},"_links":{"self":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/303"},"html":{"href":"https://github.com/aces/Loris-MRI/pull/303"},"issue":{"href":"https://api.github.com/repos/aces/Loris-MRI/issues/303"},"comments":{"href":"https://api.github.com/repos/aces/Loris-MRI/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aces/Loris-MRI/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/aces/Loris-MRI/statuses/4c50d05e438788df9f7bbe73a7cb084b7c56f38b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nicolasbrossard"}}