Created
October 18, 2019 19:42
-
-
Save JohnAmican/9e26deaa6c5ec48292b9529a079efba7 to your computer and use it in GitHub Desktop.
This file contains 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
UPDATE trades SET latest = false where root_id = 'foo' AND version = 5; -- Client 1 | |
UPDATE trades SET latest = false where root_id = 'foo' AND version = 5; -- Client 2 | |
INSERT INTO trades (latest, root_id, version) VALUES (true, 'foo', 6); -- Client 1 | |
INSERT INTO trades (latest, root_id, version) VALUES (true, 'foo', 6); -- Client 2, UNIQUENESS CONSTRAINT ERROR! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment