{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments/45481138","id":45481138,"diff_hunk":"@@ -0,0 +1,138 @@\n+// Copyright 2015 MongoDB Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+// http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#pragma once\n+\n+#include <mongocxx/config/prelude.hpp>\n+\n+#include <bsoncxx/stdx/optional.hpp>\n+#include <bsoncxx/stdx/string_view.hpp>\n+#include <mongocxx/stdx.hpp>\n+\n+namespace mongocxx {\n+MONGOCXX_INLINE_NAMESPACE_BEGIN\n+\n+class client;\n+class collection;\n+class database;\n+class uri;\n+\n+///\n+/// A class to represent the read concern. Read concern can be set at the client, database, or\n+/// collection level. The read concern can also be provided via connection string, and will be\n+/// parsed and set on the client constructed for the URI.\n+///\n+/// For the WiredTiger storage engine, MongoDB 3.2 introduced the readConcern option for replica\n+/// sets and replica set shards. The readConcern option allows clients to choose a level of\n+/// isolation for their reads. You can specify a readConcern of \"majority\" to read data that has\n+/// been written to a majority of nodes and thus cannot be rolled back. By default, MongoDB uses a\n+/// readConcern of \"local\" which does not guarantee that the read data would not be rolled back.\n+///\n+/// @TODO link to the docs when they exist.\n+///\n+class MONGOCXX_API read_concern {\n+\n+   public:\n+    ///\n+    /// A class to represent the read concern level.\n+    /// @TODO link to the docs when they exist.\n+    ///\n+    enum class level {\n+        k_local,\n+        k_majority,\n+        k_unknown,\n+    };\n+\n+    ///\n+    /// Constructs a new read_concern.\n+    ///\n+    read_concern();\n+\n+    ///\n+    /// Copy constructs a read_concern.\n+    ///\n+    read_concern(const read_concern&);\n+\n+    ///\n+    /// Copy assigns a read_concern.\n+    ///\n+    read_concern& operator=(const read_concern&);\n+\n+    ///\n+    /// Move constructs a read_concern.\n+    ///\n+    read_concern(read_concern&&) noexcept;\n+\n+    ///\n+    /// Move assigns a read_concern.\n+    ///\n+    read_concern& operator=(read_concern&&) noexcept;\n+\n+    ///\n+    /// Destroys a read_concern.\n+    ///\n+    ~read_concern();\n+\n+    ///\n+    /// Sets the read concern level.\n+    ///\n+    /// @param rc_level\n+    ///   Either k_local or k_majority.\n+    ///\n+    /// @throws std::invalid_argument if rc_level is not k_local or k_majority.","path":"src/mongocxx/read_concern.hpp","position":93,"original_position":93,"commit_id":"f67a2c1360671d998a6c5bb2131f9200c297a715","original_commit_id":"f67a2c1360671d998a6c5bb2131f9200c297a715","user":{"login":"samantharitter","id":1824529,"avatar_url":"https://avatars.githubusercontent.com/u/1824529?v=3","gravatar_id":"","url":"https://api.github.com/users/samantharitter","html_url":"https://github.com/samantharitter","followers_url":"https://api.github.com/users/samantharitter/followers","following_url":"https://api.github.com/users/samantharitter/following{/other_user}","gists_url":"https://api.github.com/users/samantharitter/gists{/gist_id}","starred_url":"https://api.github.com/users/samantharitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samantharitter/subscriptions","organizations_url":"https://api.github.com/users/samantharitter/orgs","repos_url":"https://api.github.com/users/samantharitter/repos","events_url":"https://api.github.com/users/samantharitter/events{/privacy}","received_events_url":"https://api.github.com/users/samantharitter/received_events","type":"User","site_admin":false},"body":"Our first mongocxx-generated exception??","created_at":"2015-11-20T15:35:17Z","updated_at":"2015-11-20T15:35:17Z","html_url":"https://github.com/mongodb/mongo-cxx-driver/pull/378#discussion_r45481138","pull_request_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments/45481138"},"html":{"href":"https://github.com/mongodb/mongo-cxx-driver/pull/378#discussion_r45481138"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378","id":51294113,"html_url":"https://github.com/mongodb/mongo-cxx-driver/pull/378","diff_url":"https://github.com/mongodb/mongo-cxx-driver/pull/378.diff","patch_url":"https://github.com/mongodb/mongo-cxx-driver/pull/378.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/378","number":378,"state":"open","locked":false,"title":"CXX-695 Support for Read Concern","user":{"login":"Machyne","id":2737181,"avatar_url":"https://avatars.githubusercontent.com/u/2737181?v=3","gravatar_id":"","url":"https://api.github.com/users/Machyne","html_url":"https://github.com/Machyne","followers_url":"https://api.github.com/users/Machyne/followers","following_url":"https://api.github.com/users/Machyne/following{/other_user}","gists_url":"https://api.github.com/users/Machyne/gists{/gist_id}","starred_url":"https://api.github.com/users/Machyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Machyne/subscriptions","organizations_url":"https://api.github.com/users/Machyne/orgs","repos_url":"https://api.github.com/users/Machyne/repos","events_url":"https://api.github.com/users/Machyne/events{/privacy}","received_events_url":"https://api.github.com/users/Machyne/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-19T22:55:24Z","updated_at":"2015-11-20T15:35:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"487d3c2d0becb2e1b575042b8490660c908c40e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/378/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/statuses/f67a2c1360671d998a6c5bb2131f9200c297a715","head":{"label":"Machyne:CXX-695","ref":"CXX-695","sha":"f67a2c1360671d998a6c5bb2131f9200c297a715","user":{"login":"Machyne","id":2737181,"avatar_url":"https://avatars.githubusercontent.com/u/2737181?v=3","gravatar_id":"","url":"https://api.github.com/users/Machyne","html_url":"https://github.com/Machyne","followers_url":"https://api.github.com/users/Machyne/followers","following_url":"https://api.github.com/users/Machyne/following{/other_user}","gists_url":"https://api.github.com/users/Machyne/gists{/gist_id}","starred_url":"https://api.github.com/users/Machyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Machyne/subscriptions","organizations_url":"https://api.github.com/users/Machyne/orgs","repos_url":"https://api.github.com/users/Machyne/repos","events_url":"https://api.github.com/users/Machyne/events{/privacy}","received_events_url":"https://api.github.com/users/Machyne/received_events","type":"User","site_admin":false},"repo":{"id":44116438,"name":"mongo-cxx-driver","full_name":"Machyne/mongo-cxx-driver","owner":{"login":"Machyne","id":2737181,"avatar_url":"https://avatars.githubusercontent.com/u/2737181?v=3","gravatar_id":"","url":"https://api.github.com/users/Machyne","html_url":"https://github.com/Machyne","followers_url":"https://api.github.com/users/Machyne/followers","following_url":"https://api.github.com/users/Machyne/following{/other_user}","gists_url":"https://api.github.com/users/Machyne/gists{/gist_id}","starred_url":"https://api.github.com/users/Machyne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Machyne/subscriptions","organizations_url":"https://api.github.com/users/Machyne/orgs","repos_url":"https://api.github.com/users/Machyne/repos","events_url":"https://api.github.com/users/Machyne/events{/privacy}","received_events_url":"https://api.github.com/users/Machyne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Machyne/mongo-cxx-driver","description":"C++ Driver for MongoDB","fork":true,"url":"https://api.github.com/repos/Machyne/mongo-cxx-driver","forks_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/forks","keys_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/teams","hooks_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/hooks","issue_events_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/issues/events{/number}","events_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/events","assignees_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/assignees{/user}","branches_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/branches{/branch}","tags_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/tags","blobs_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/languages","stargazers_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/stargazers","contributors_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/contributors","subscribers_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/subscribers","subscription_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/subscription","commits_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/contents/{+path}","compare_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/merges","archive_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/downloads","issues_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/issues{/number}","pulls_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/labels{/name}","releases_url":"https://api.github.com/repos/Machyne/mongo-cxx-driver/releases{/id}","created_at":"2015-10-12T15:29:36Z","updated_at":"2015-10-12T15:29:38Z","pushed_at":"2015-11-19T22:54:16Z","git_url":"git://github.com/Machyne/mongo-cxx-driver.git","ssh_url":"git@github.com:Machyne/mongo-cxx-driver.git","clone_url":"https://github.com/Machyne/mongo-cxx-driver.git","svn_url":"https://github.com/Machyne/mongo-cxx-driver","homepage":null,"size":5570,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"legacy"}},"base":{"label":"mongodb:master","ref":"master","sha":"d76b8d32d77c6c1a97ae29edaa58947d108bedf3","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":15881868,"name":"mongo-cxx-driver","full_name":"mongodb/mongo-cxx-driver","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars.githubusercontent.com/u/45120?v=3","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/mongo-cxx-driver","description":"C++ Driver for MongoDB","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-cxx-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-cxx-driver/releases{/id}","created_at":"2014-01-13T21:08:36Z","updated_at":"2015-11-20T04:34:27Z","pushed_at":"2015-11-19T22:55:26Z","git_url":"git://github.com/mongodb/mongo-cxx-driver.git","ssh_url":"git@github.com:mongodb/mongo-cxx-driver.git","clone_url":"https://github.com/mongodb/mongo-cxx-driver.git","svn_url":"https://github.com/mongodb/mongo-cxx-driver","homepage":null,"size":6620,"stargazers_count":204,"watchers_count":204,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":185,"mirror_url":null,"open_issues_count":14,"forks":185,"open_issues":14,"watchers":204,"default_branch":"legacy"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378"},"html":{"href":"https://github.com/mongodb/mongo-cxx-driver/pull/378"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/378"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-cxx-driver/statuses/f67a2c1360671d998a6c5bb2131f9200c297a715"}}}}