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

Feature skip_preload #34

Merged
merged 3 commits into from Jul 21, 2020
Merged

Conversation

OuYangJinTing
Copy link
Contributor

Thank for this gem and all contributors. This gem is great, auto-preload config is convenient.
But sometimes we don’t need to loads all records association auto matically, just load AR own associations.
This PR is trying to deal with this scene.

@coveralls
Copy link

coveralls commented Jul 17, 2020

Pull Request Test Coverage Report for Build 247

  • 14 of 14 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.4%) to 99.696%

Totals Coverage Status
Change from base Build 245: 4.4%
Covered Lines: 655
Relevant Lines: 657

💛 - Coveralls

4 similar comments
@coveralls
Copy link

Pull Request Test Coverage Report for Build 247

  • 14 of 14 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.4%) to 99.696%

Totals Coverage Status
Change from base Build 245: 4.4%
Covered Lines: 655
Relevant Lines: 657

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 247

  • 14 of 14 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.4%) to 99.696%

Totals Coverage Status
Change from base Build 245: 4.4%
Covered Lines: 655
Relevant Lines: 657

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 247

  • 14 of 14 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.4%) to 99.696%

Totals Coverage Status
Change from base Build 245: 4.4%
Covered Lines: 655
Relevant Lines: 657

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 247

  • 14 of 14 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.4%) to 99.696%

Totals Coverage Status
Change from base Build 245: 4.4%
Covered Lines: 655
Relevant Lines: 657

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 17, 2020

Pull Request Test Coverage Report for Build 250

  • 29 of 29 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 95.48%

Totals Coverage Status
Change from base Build 245: 0.2%
Covered Lines: 676
Relevant Lines: 708

💛 - Coveralls

@OuYangJinTing OuYangJinTing changed the title Feature skip_auto_preload Feature skip_preload Jul 18, 2020
@PikachuEXE
Copy link
Contributor

  1. I don't quite understand what this does
    Imagine you are writing README section about this new method, what would you write?

  2. Commit Fix sql matching seems strange as the previous commit got a pass in CI build
    Or is it just a refactor (in spec)?

@OuYangJinTing
Copy link
Contributor Author

OuYangJinTing commented Jul 20, 2020

  1. I don't quite understand what this does
    Imagine you are writing README section about this new method, what would you write?
  2. Commit Fix sql matching seems strange as the previous commit got a pass in CI build
    Or is it just a refactor (in spec)?

The #skip_preload is for avoid preload all associations at special scene.
I try to udpate README, #skip_preload add to Auto preloading section.
About Fix sql matching commit, some rails version CI build is failed, it has two different SQL cases.

SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (1, 2)
or
SELECT "posts".* FROM "posts" WHERE "posts"."user_id" IN (?, ?)  [["user_id", 1], [user_id", 2]]

@PikachuEXE
Copy link
Contributor

I think your README update is incomplete/broken...

@OuYangJinTing
Copy link
Contributor Author

I think your README update is incomplete/broken...

Very much your remind. I'm so sorry, ignored skip_preload method call.

Copy link
Owner

@DmitryTsepelev DmitryTsepelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @OuYangJinTing, thank you for the PR!

I've requested some minor changes, and please add yourself to the changelog.

Also, thanks @PikachuEXE for taking a lead on the review 👍

README.md Outdated Show resolved Hide resolved
Copy link
Owner

@DmitryTsepelev DmitryTsepelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@DmitryTsepelev DmitryTsepelev merged commit 9d711e5 into DmitryTsepelev:master Jul 21, 2020
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

4 participants