File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ Thanks to this small library, you can create relatively simple code without the
20
20
21
21
Normally a web application is using following pattern to modify data in the database:
22
22
23
- 1 . ** Load resource** from database. Resource is some portion of data
24
- such as set of records from relational database, document from Document-oriented database or value from KV store.
23
+ 1 . ** Load resource** from database. ** Resource** is some portion of data
24
+ such as set of records from relational database, document from Document-oriented database or value from KV store
25
+ (in Domain-Driven Design terms it is called an [ aggregate] ( https://martinfowler.com/bliki/DDD_Aggregate.html ) ).
25
26
Lock the entire resource pessimistically or optimistically (by reading version number).
26
27
2 . ** Apply change** to data in plain Go
27
28
3 . ** Save resource** to database. Release the pessimistic lock. Or run
You can’t perform that action at this time.
0 commit comments