Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
smerchek
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
smerchek
11y ago
The version is part of the WHERE clause in the UPDATE statement. Therefore, it is only possible to update the version of the entity that you were updating. If the entity is updated before your statement, it would not succeed in updating the
2.
▲
by
smerchek
11y ago
Totally noticed this in google analytics, earlier. Whoops. It's now fixed!
3.
▲
by
smerchek
11y ago
Concurrency issues can be solved by restricting the UPDATE to the version passed in by the application. If I think I'm updating version 2 of an entity, then only update that version, otherwise throw an error. I've updated the post
4.
▲
by
smerchek
11y ago
Valid question though, I've updated the post to be more explicit and added a couple more query examples.
5.
▲
Taking the 'D' Out of CRUD with Soft Updates
(scottsmerchek.com)
68 points
by
smerchek
11y ago
|
58 comments
6.
▲
by
smerchek
11y ago
Right. I think updates are just as destructive, and oftentimes completely change the meaning on an entity. That's why I also wrote about using soft updates: http://scottsmerchek.com/2015/08/04/taking-the-
7.
▲
Taking the 'D' Out of CRUD with Soft Deletes
(scottsmerchek.com)
1 points
by
smerchek
11y ago
|
2 comments