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

add hooks support #7

Closed
wants to merge 1 commit into from
Closed

add hooks support #7

wants to merge 1 commit into from

Conversation

yflau
Copy link
Contributor

@yflau yflau commented May 9, 2024

给数据库driver注入sqlhooks.Hooks, 例如注入log hook,则每各sql请求都会自动记录日志,详见readme

@trheyi
Copy link
Contributor

trheyi commented May 9, 2024

感谢!这个功能真赞 。

不过单元测试似乎没通过,应该是初始化的时候默认参数不对,辛苦再完善一下, 我先把这个PR关了。

https://github.com/YaoApp/xun/actions/runs/9014875312/job/24776088949

@trheyi trheyi closed this May 9, 2024
@yflau
Copy link
Contributor Author

yflau commented May 10, 2024

我修复了driver设定的问题,但是ut还报了这个错误,好像和代码没关系:
=== RUN TestPing
capsule_test.go:58: Error 1045: Access denied for user 'xun'@'172.17.0.1' (using password: NO)
https://github.com/yflau/xun/actions/runs/9029655981/job/24813459632
帮忙看下? @trheyi

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