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 2020-07-13 13:30:29 +00:00
Contributor
No description provided.
Thomas_An added 2 commits 2020-07-09 09:51:37 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
3a48920a98
session add Engine func
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 2020-07-09 09:52:12 +00:00
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 2020-07-09 10:17:39 +00:00
Thomas_An started working 2020-07-09 11:45:27 +00:00
lunny added the
kind
enhancement
label 2020-07-09 15:06:16 +00:00
Author
Contributor

@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 2020-07-10 13:46:56 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
06f24231f2
add test code
Thomas_An added 1 commit 2020-07-10 13:49:31 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
46cf5a88d5
Merge branch 'master' into master
Author
Contributor

@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?
Author
Contributor

@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?
Author
Contributor

@lunny example:
image
image

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

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 2020-07-13 04:16:16 +00:00
Thomas_An added 2 commits 2020-07-13 07:52:22 +00:00
lunny requested changes 2020-07-13 08:20:28 +00:00
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 2020-07-13 10:03:26 +00:00
Thomas_An added 3 commits 2020-07-13 10:24:54 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
7a1a1c04be
Merge branch 'log_context_add_db_info'
lunny approved these changes 2020-07-13 13:29:00 +00:00
Dismissed
lunny merged commit 0fae64bb3b into master 2020-07-13 13:29:43 +00:00
Owner

Thanks!

Thanks!
Sign in to join this conversation.
No description provided.