{"action":"created","comment":{"url":"https://api.github.com/repos/datastax/python-driver/pulls/comments/53943976","id":53943976,"diff_hunk":"@@ -3409,3 +3409,24 @@ def get_all_query_traces(self, max_wait_sec_per=None):\n         See :meth:`.ResponseFuture.get_all_query_traces` for details.\n         \"\"\"\n         return self.response_future.get_all_query_traces(max_wait_sec_per)\n+\n+    @property\n+    def was_applied(self):\n+        \"\"\"\n+        For LWT results, returns whether the transaction was applied.\n+\n+        Result is indeterminate if called on a result that was not an LWT request.\n+\n+        Only valid when one of tne of the internal row factories is in use.\n+        \"\"\"\n+        if self.response_future.row_factory not in (named_tuple_factory, dict_factory, tuple_factory):\n+            raise RuntimeError(\"Cannot determine LWT result with row factory %s\" % (self.response_future.row_factsory,))\n+        if len(self.current_rows) != 1:\n+            raise RuntimeError(\"LWT result should have exactly one row. This has %d.\" % (len(self.current_rows)))\n+\n+        row = self.current_rows[0]\n+        if isinstance(row, tuple):\n+            return row[0]\n+        else:\n+            return row['[applied]']","path":"cassandra/cluster.py","position":34,"original_position":34,"commit_id":"5e102605cdff5afd987c463e27b442b94a4f755f","original_commit_id":"5e102605cdff5afd987c463e27b442b94a4f755f","user":{"login":"aholmberg","id":1443722,"avatar_url":"https://avatars.githubusercontent.com/u/1443722?v=3","gravatar_id":"","url":"https://api.github.com/users/aholmberg","html_url":"https://github.com/aholmberg","followers_url":"https://api.github.com/users/aholmberg/followers","following_url":"https://api.github.com/users/aholmberg/following{/other_user}","gists_url":"https://api.github.com/users/aholmberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aholmberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aholmberg/subscriptions","organizations_url":"https://api.github.com/users/aholmberg/orgs","repos_url":"https://api.github.com/users/aholmberg/repos","events_url":"https://api.github.com/users/aholmberg/events{/privacy}","received_events_url":"https://api.github.com/users/aholmberg/received_events","type":"User","site_admin":false},"body":"Yes. I have a bit of documentation about it [here] (https://github.com/datastax/python-driver/blob/master/docs/lwt.rst#specialized-results). I'm not aware of any documentation about it in the server.","created_at":"2016-02-24T14:21:32Z","updated_at":"2016-02-24T14:21:32Z","html_url":"https://github.com/datastax/python-driver/pull/488#discussion_r53943976","pull_request_url":"https://api.github.com/repos/datastax/python-driver/pulls/488","_links":{"self":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/comments/53943976"},"html":{"href":"https://github.com/datastax/python-driver/pull/488#discussion_r53943976"},"pull_request":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/488"}}},"pull_request":{"url":"https://api.github.com/repos/datastax/python-driver/pulls/488","id":60396943,"html_url":"https://github.com/datastax/python-driver/pull/488","diff_url":"https://github.com/datastax/python-driver/pull/488.diff","patch_url":"https://github.com/datastax/python-driver/pull/488.patch","issue_url":"https://api.github.com/repos/datastax/python-driver/issues/488","number":488,"state":"open","locked":false,"title":"PYTHON-336 - Expose LWT results in cqlengine LWTException","user":{"login":"aholmberg","id":1443722,"avatar_url":"https://avatars.githubusercontent.com/u/1443722?v=3","gravatar_id":"","url":"https://api.github.com/users/aholmberg","html_url":"https://github.com/aholmberg","followers_url":"https://api.github.com/users/aholmberg/followers","following_url":"https://api.github.com/users/aholmberg/following{/other_user}","gists_url":"https://api.github.com/users/aholmberg/gists{/gist_id}","starred_url":"https://api.github.com/users/aholmberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aholmberg/subscriptions","organizations_url":"https://api.github.com/users/aholmberg/orgs","repos_url":"https://api.github.com/users/aholmberg/repos","events_url":"https://api.github.com/users/aholmberg/events{/privacy}","received_events_url":"https://api.github.com/users/aholmberg/received_events","type":"User","site_admin":false},"body":"Superset of #343 and targeting 3.1 dev branch.","created_at":"2016-02-23T19:40:16Z","updated_at":"2016-02-24T14:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67c48446ea3a1395b72e4233b52abde5b7f9dd3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datastax/python-driver/pulls/488/commits","review_comments_url":"https://api.github.com/repos/datastax/python-driver/pulls/488/comments","review_comment_url":"https://api.github.com/repos/datastax/python-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datastax/python-driver/issues/488/comments","statuses_url":"https://api.github.com/repos/datastax/python-driver/statuses/5e102605cdff5afd987c463e27b442b94a4f755f","head":{"label":"datastax:336","ref":"336","sha":"5e102605cdff5afd987c463e27b442b94a4f755f","user":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":11262602,"name":"python-driver","full_name":"datastax/python-driver","owner":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datastax/python-driver","description":"DataStax Python Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/python-driver","forks_url":"https://api.github.com/repos/datastax/python-driver/forks","keys_url":"https://api.github.com/repos/datastax/python-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/python-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/python-driver/teams","hooks_url":"https://api.github.com/repos/datastax/python-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/python-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/python-driver/events","assignees_url":"https://api.github.com/repos/datastax/python-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/python-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/python-driver/tags","blobs_url":"https://api.github.com/repos/datastax/python-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/python-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/python-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/python-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/python-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/python-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/python-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/python-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/python-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/python-driver/subscription","commits_url":"https://api.github.com/repos/datastax/python-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/python-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/python-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/python-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/python-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/python-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/python-driver/merges","archive_url":"https://api.github.com/repos/datastax/python-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/python-driver/downloads","issues_url":"https://api.github.com/repos/datastax/python-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/python-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/python-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/python-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/python-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/python-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/python-driver/deployments","created_at":"2013-07-08T19:02:31Z","updated_at":"2016-02-21T09:34:32Z","pushed_at":"2016-02-24T12:50:54Z","git_url":"git://github.com/datastax/python-driver.git","ssh_url":"git@github.com:datastax/python-driver.git","clone_url":"https://github.com/datastax/python-driver.git","svn_url":"https://github.com/datastax/python-driver","homepage":"","size":14596,"stargazers_count":471,"watchers_count":471,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":223,"mirror_url":null,"open_issues_count":10,"forks":223,"open_issues":10,"watchers":471,"default_branch":"master"}},"base":{"label":"datastax:3.1","ref":"3.1","sha":"f1e49230ebd74ee14771a36c9b7bca7eba5fee15","user":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":11262602,"name":"python-driver","full_name":"datastax/python-driver","owner":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datastax/python-driver","description":"DataStax Python Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/python-driver","forks_url":"https://api.github.com/repos/datastax/python-driver/forks","keys_url":"https://api.github.com/repos/datastax/python-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/python-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/python-driver/teams","hooks_url":"https://api.github.com/repos/datastax/python-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/python-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/python-driver/events","assignees_url":"https://api.github.com/repos/datastax/python-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/python-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/python-driver/tags","blobs_url":"https://api.github.com/repos/datastax/python-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/python-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/python-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/python-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/python-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/python-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/python-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/python-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/python-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/python-driver/subscription","commits_url":"https://api.github.com/repos/datastax/python-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/python-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/python-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/python-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/python-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/python-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/python-driver/merges","archive_url":"https://api.github.com/repos/datastax/python-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/python-driver/downloads","issues_url":"https://api.github.com/repos/datastax/python-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/python-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/python-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/python-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/python-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/python-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/python-driver/deployments","created_at":"2013-07-08T19:02:31Z","updated_at":"2016-02-21T09:34:32Z","pushed_at":"2016-02-24T12:50:54Z","git_url":"git://github.com/datastax/python-driver.git","ssh_url":"git@github.com:datastax/python-driver.git","clone_url":"https://github.com/datastax/python-driver.git","svn_url":"https://github.com/datastax/python-driver","homepage":"","size":14596,"stargazers_count":471,"watchers_count":471,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":223,"mirror_url":null,"open_issues_count":10,"forks":223,"open_issues":10,"watchers":471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/488"},"html":{"href":"https://github.com/datastax/python-driver/pull/488"},"issue":{"href":"https://api.github.com/repos/datastax/python-driver/issues/488"},"comments":{"href":"https://api.github.com/repos/datastax/python-driver/issues/488/comments"},"review_comments":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/488/comments"},"review_comment":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datastax/python-driver/pulls/488/commits"},"statuses":{"href":"https://api.github.com/repos/datastax/python-driver/statuses/5e102605cdff5afd987c463e27b442b94a4f755f"}}}}