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

Generic type Repository wrapper #318

Merged
merged 9 commits into from Oct 17, 2022
Merged

Generic type Repository wrapper #318

merged 9 commits into from Oct 17, 2022

Conversation

Fs02
Copy link
Member

@Fs02 Fs02 commented Oct 14, 2022

  • Simple wrapper to provide type safety to repository
  • Rename record/records to be entity/entities, because the new generic repository is named as EntityRepository

@codecov
Copy link

codecov bot commented Oct 15, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (c4186df) compared to base (eaad046).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #318   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        35    +2     
  Lines         2766      2826   +60     
=========================================
+ Hits          2766      2826   +60     
Impacted Files Coverage Δ
mutation.go 100.00% <ø> (ø)
changeset.go 100.00% <100.00%> (ø)
collection.go 100.00% <100.00%> (ø)
document.go 100.00% <100.00%> (ø)
entity_iterator_go.1.18.go 100.00% <100.00%> (ø)
entity_repository_go1.18.go 100.00% <100.00%> (ø)
errors.go 100.00% <100.00%> (ø)
iterator.go 100.00% <100.00%> (ø)
map.go 100.00% <100.00%> (ø)
repository.go 100.00% <100.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@slashformotion
Copy link

Hello I work of the R&D department at @ditrit we are very interested in this type of modifications. Currently we are implementing a Generic repository on top of gorm, which is far from ideal...

@Fs02
Copy link
Member Author

Fs02 commented Oct 17, 2022

Hi @slashformotion, I'm glad that you are interested in this, this will be merged soon and support for go-rel/reltest will also follow. the plan is to release this overall changes within this week or next week

if you've any feedback or improvement idea, let me know

@Fs02 Fs02 marked this pull request as ready for review October 17, 2022 14:30
@Fs02 Fs02 merged commit bfe77a0 into master Oct 17, 2022
@Fs02 Fs02 deleted the generic-repository-wrapper branch October 17, 2022 14:32
@slashformotion
Copy link

for a cleaner git history you should probably not merge master into anything, you should rebase
image
see this https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-Git-rebase-a-branch-to-master-example

@Fs02
Copy link
Member Author

Fs02 commented Oct 17, 2022

I'm using squash merge, which have the same result as rebase with with much more cleaner commit history
image

(not to mention, it's easier to resolve even the worst conflict using merge commit while working in a PR branch)

@Fs02
Copy link
Member Author

Fs02 commented Oct 17, 2022

also, with squash merge, there's no need to enable "allow force-push", which I'm very against with 🙈

@slashformotion
Copy link

interesting , I will look into it

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

2 participants