go-rel / rel

:gem: Modern ORM for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
https://go-rel.github.io/
MIT License
744 stars 58 forks source link

Generic type Repository wrapper #318

Closed Fs02 closed 1 year ago

Fs02 commented 1 year ago
codecov[bot] commented 1 year ago

Codecov Report

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

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 ```diff @@ Coverage Diff @@ ## master #318 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 33 35 +2 Lines 2766 2826 +60 ========================================= + Hits 2766 2826 +60 ``` | [Impacted Files](https://codecov.io/gh/go-rel/rel/pull/318?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel) | Coverage Δ | | |---|---|---| | [mutation.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-bXV0YXRpb24uZ28=) | `100.00% <ø> (ø)` | | | [changeset.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-Y2hhbmdlc2V0Lmdv) | `100.00% <100.00%> (ø)` | | | [collection.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-Y29sbGVjdGlvbi5nbw==) | `100.00% <100.00%> (ø)` | | | [document.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-ZG9jdW1lbnQuZ28=) | `100.00% <100.00%> (ø)` | | | [entity\_iterator\_go.1.18.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-ZW50aXR5X2l0ZXJhdG9yX2dvLjEuMTguZ28=) | `100.00% <100.00%> (ø)` | | | [entity\_repository\_go1.18.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-ZW50aXR5X3JlcG9zaXRvcnlfZ28xLjE4Lmdv) | `100.00% <100.00%> (ø)` | | | [errors.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-ZXJyb3JzLmdv) | `100.00% <100.00%> (ø)` | | | [iterator.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-aXRlcmF0b3IuZ28=) | `100.00% <100.00%> (ø)` | | | [map.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-bWFwLmdv) | `100.00% <100.00%> (ø)` | | | [repository.go](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel#diff-cmVwb3NpdG9yeS5nbw==) | `100.00% <100.00%> (ø)` | | | ... and [1 more](https://codecov.io/gh/go-rel/rel/pull/318/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=go-rel)

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

slashformotion commented 1 year ago

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 commented 1 year ago

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

slashformotion commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

slashformotion commented 1 year ago

interesting , I will look into it