Conversation
Adds a custom attribute, `existing`, to the LWTException instance which allows the application layer to inspect the values read from Cassandra which conflicted with the attempted conditional write. The documentation already referred to the `existing` attribute but it was not implemented.
| Only valid when one of tne of the internal row factories is in use. | ||
| """ | ||
| if self.response_future.row_factory not in (named_tuple_factory, dict_factory, tuple_factory): | ||
| raise RuntimeError("Cannot determine LWT result with row factory %s" % (self.response_future.row_factsory,)) |
Contributor
There was a problem hiding this comment.
just wondering, should we prefer/force the use of new string formatting (format())?
Contributor
Author
There was a problem hiding this comment.
core driver uses all '%', so this is consistent within that layer. cqlengine was using format() when we brought it in, but it had to be updated because it used unnamed placeholders. I haven't had time or cause to align the two so I've just been keeping it consistent within each package.
Contributor
|
LGTM! |
aholmberg
added a commit
that referenced
this pull request
Feb 24, 2016
PYTHON-336 - Expose LWT results in cqlengine LWTException
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superset of #343 and targeting 3.1 dev branch.