Support get dataSourceName on ContextHook for monitor which DB executed SQL #1740

Merged
lunny merged 9 commits from Thomas_An/thomasan_xorm:master into master 3 years ago
There is no content yet.
Thomas_An added 2 commits 3 years ago
Thomas_An changed title from WIP: support get dataSourceName on ContextHook for to WIP: support get dataSourceName on ContextHook for monitor which DB executed SQL 3 years ago
Thomas_An changed title from WIP: support get dataSourceName on ContextHook for monitor which DB executed SQL to Support get dataSourceName on ContextHook for monitor which DB executed SQL 3 years ago
Thomas_An started working 3 years ago
lunny added the kind/enhancement label 3 years ago
Poster

@lunny Can help merge the code into the master?

@lunny Can help merge the code into the master?
lunny commented 3 years ago
Owner

Could you add some tests for this PR?

Could you add some tests for this PR?
Thomas_An added 1 commit 3 years ago
continuous-integration/drone/pr Build is passing Details
06f24231f2
add test code
Thomas_An added 1 commit 3 years ago
continuous-integration/drone/pr Build is passing Details
46cf5a88d5
Merge branch 'master' into master
Poster

@lunny test code has been submitted,please help review

@lunny test code has been submitted,please help review
lunny commented 3 years ago
Owner

@Thomas_An Thanks! How will you want to use this feature?

@Thomas_An Thanks! How will you want to use this feature?
Poster

@lunny Hope to be online before the 24th of this month

@lunny Hope to be online before the 24th of this month
lunny commented 3 years ago
Owner

@Thomas_An I mean could you give some example codes about how will you use the new feature?

@Thomas_An I mean could you give some example codes about how will you use the new feature?
Poster

@lunny example:
image
image

@lunny example: ![image](/attachments/bf1ae6e9-9453-42dc-b52e-a42c02a0b7e9) ![image](/attachments/7306fc50-be15-4747-a2a0-bafddd3bd378)
200 KiB
103 KiB
Poster

do you have a better solution?

do you have a better solution?
lunny commented 3 years ago
Owner

Maybe just put the session directly?

ctx = context.WithValue(engine.defaultContext, log.SessionKey, session)
Maybe just put the session directly? ```go ctx = context.WithValue(engine.defaultContext, log.SessionKey, session) ```
lunny added this to the 1.0.4 milestone 3 years ago
Thomas_An added 2 commits 3 years ago
lunny requested changes 3 years ago
Dismissed
lunny left a comment
Owner

The session id should be kept both to keep compitable as before.

The session id should be kept both to keep compitable as before.
Thomas_An requested review from lunny 3 years ago
Thomas_An added 3 commits 3 years ago
lunny approved these changes 3 years ago
Dismissed
lunny merged commit 0fae64bb3b into master 3 years ago
lunny commented 3 years ago
Owner

Thanks!

Thanks!
continuous-integration/drone/pr Build is passing
The pull request has been merged as 0fae64bb3b.
Sign in to join this conversation.
Loading…
There is no content yet.