stratumn / go-core

Stratumn's core utilities to create decentralized applications and networks
Apache License 2.0
0 stars 0 forks source link

store: create links batch #516

Closed t-bast closed 5 years ago

t-bast commented 5 years ago

Add the option to create multiple links in an atomic batch. I chose to make it explicit that it's a batch by using a new route (it makes it easier for backwards-compatibility too). It's not unrealistic at some point to use the /links route and make it accept a more complex payload (collection of links + a boolean to choose what to do in case of error: atomic or not).

Fixes #515


This change is Reviewable

codecov[bot] commented 5 years ago

Codecov Report

Merging #516 into master will increase coverage by 0.14%. The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #516      +/-   ##
==========================================
+ Coverage   71.44%   71.58%   +0.14%     
==========================================
  Files         100      100              
  Lines        5564     5617      +53     
==========================================
+ Hits         3975     4021      +46     
- Misses       1223     1228       +5     
- Partials      366      368       +2
Impacted Files Coverage Δ
store/storetesting/mockadapter.go 73.75% <0%> (ø) :arrow_up:
postgresstore/postgresstore.go 75.29% <100%> (+0.59%) :arrow_up:
postgresstore/segment.go 63.44% <100%> (+0.39%) :arrow_up:
postgresstore/batch.go 69.76% <78.94%> (+7.26%) :arrow_up:
store/storehttp/storehttp.go 82.82% <90%> (+1.61%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f93ed0c...c807df7. Read the comment docs.