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 1 year ago
Thomas_An commented 1 year ago
There is no content yet.
Thomas_An added 2 commits 1 year 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 1 year 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 1 year ago
Thomas_An started working 1 year ago
lunny added the
kind/enhancement
label 1 year ago
Poster

@lunny Can help merge the code into the master?

@lunny Can help merge the code into the master?
Owner

Could you add some tests for this PR?

Could you add some tests for this PR?
Thomas_An added 1 commit 1 year ago
06f24231f2 add test code
Thomas_An added 1 commit 1 year ago
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
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
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?
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 1 year ago
Thomas_An added 2 commits 1 year ago
lunny requested changes 1 year ago
Dismissed
lunny left a comment

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

Thomas_An requested review from lunny 1 year ago
Thomas_An added 3 commits 1 year ago
lunny approved these changes 1 year ago
Dismissed
lunny merged commit 0fae64bb3b into master 1 year 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.