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

feat: trace sharding log #29

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

a631807682
Copy link
Member

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Even if we use the sharding model, the log will only print the original sql.
This feature is used to print the sql log of the actual execution.
This is similar to LastQuery, the difference is that in a model with an associated relationship, the log will be printed multiple times, while LastQuery records the last time.

User Case Description

@a631807682
Copy link
Member Author

Affects TestReadWriteSplitting, I'll try to fix it.

@a631807682
Copy link
Member Author

related to go-gorm/gorm#5304

@a631807682
Copy link
Member Author

It fixed in next gorm version

@jinzhu
Copy link
Member

jinzhu commented May 4, 2022

Hello @a631807682

Can you fix the file conflict?

Thank you.

@a631807682 a631807682 requested a review from jinzhu May 5, 2022 01:23
@hyperphoton hyperphoton requested review from hyperphoton and removed request for hyperphoton and jinzhu June 7, 2022 03:25
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.

2 participants