-
-
Save elliotchance/41d1cd78838ecd73b84cc2372ea69c10 to your computer and use it in GitHub Desktop.
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
class RepeatableReadTransaction(ReadCommittedTransaction): | |
def record_is_locked(self, record): | |
return ReadCommittedTransaction.record_is_locked(self, record) or \ | |
self.table.locks.exists(self, record['id']) | |
def record_is_visible(self, record): | |
is_visible = ReadCommittedTransaction.record_is_visible(self, record) | |
if is_visible: | |
self.table.locks.add(self, record['id']) | |
return is_visible |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment