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

计划增加 logging 参数 #121

Closed
rockdai opened this issue Sep 14, 2024 · 2 comments · Fixed by #122
Closed

计划增加 logging 参数 #121

rockdai opened this issue Sep 14, 2024 · 2 comments · Fixed by #122
Assignees

Comments

@rockdai
Copy link
Contributor

rockdai commented Sep 14, 2024

用于将实际执行的 SQL 暴露出来

用法:

const db = new RDSClient({
  host: 'your-rds-address.mysql.rds.aliyuncs.com',
  // ...
  logging: (sql) => {
    console.log('sql -->', sql);
  },
});

在这里调用一把 logging 传进来的方法:
https://github.com/ali-sdk/ali-rds/blob/master/src/operator.ts#L82

@fengmk2 看看这样如何?可以的话我来实现一下

@fengmk2
Copy link
Member

fengmk2 commented Sep 14, 2024

可以,来吧。

@rockdai
Copy link
Contributor Author

rockdai commented Sep 23, 2024

#122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants