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

Add support for scanning embedded assoc #289

Closed
wants to merge 2 commits into from

Conversation

Fs02
Copy link
Member

@Fs02 Fs02 commented Jun 4, 2022

Scan query result to embedded has one or belongs to association when the returned query result have field path to the association (example: "assoc_name.field_name")

example:

var users []Users
err := repo.FindAll(ctx, &users, rel.Select("*", "follower_stats.followers_count").Join("follower_stats").Where(where.Gt("follower_stats.followers_count", 100)))

related: #287

@codecov
Copy link

codecov bot commented Jun 4, 2022

Codecov Report

Merging #289 (59b0b1b) into master (115ffc0) will decrease coverage by 0.21%.
The diff coverage is 81.25%.

@@             Coverage Diff             @@
##            master     #289      +/-   ##
===========================================
- Coverage   100.00%   99.78%   -0.22%     
===========================================
  Files           33       33              
  Lines         2778     2789      +11     
===========================================
+ Hits          2778     2783       +5     
- Misses           0        3       +3     
- Partials         0        3       +3     
Impacted Files Coverage Δ
association.go 98.16% <66.66%> (-1.84%) ⬇️
document.go 98.57% <84.61%> (-1.43%) ⬇️

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 115ffc0...59b0b1b. Read the comment docs.

@Fs02
Copy link
Member Author

Fs02 commented Jun 4, 2022

better implementation: #290

@Fs02 Fs02 closed this Jun 4, 2022
@Fs02 Fs02 deleted the add-support-for-scanning-embedded-assoc branch June 4, 2022 02:11
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