Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimistic DB Insert and Update #33

Merged
merged 47 commits into from Jan 30, 2020
Merged

Optimistic DB Insert and Update #33

merged 47 commits into from Jan 30, 2020

Conversation

Fs02
Copy link
Member

@Fs02 Fs02 commented Jan 27, 2020

Previously, data will be re-queried after insert and update is performed. This changes will reduce that unnecessary query by applying mutation directly to record, so no re-query is needed.

  • Apply modification directly to record
  • Don't re-query after insert/update, except Reload is specified.
  • Use affected record to determine if operation is succeed or not.

structset.go Outdated Show resolved Hide resolved
structset.go Show resolved Hide resolved
adapter/specs/insert.go Show resolved Hide resolved
adapter/specs/insert.go Show resolved Hide resolved
reltest/repository.go Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Jan 27, 2020

Code Climate has analyzed commit c5c8a45 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 95.8% (95% is the threshold).

This pull request will bring the total coverage in the repository to 97.4% (2.1% change).

View more on Code Climate.

structset.go Show resolved Hide resolved
structset.go Show resolved Hide resolved
@Fs02 Fs02 merged commit cb8acd2 into master Jan 30, 2020
@Fs02 Fs02 deleted the optimistic-create-and-update branch January 30, 2020 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant