Skip to content

【腾讯犀牛鸟开源课题实战】对接mysql sdk #1

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

Merged
merged 39 commits into from
Jan 17, 2025

Conversation

KosmosFult
Copy link
Contributor

related issue

mysql service相关主体部分

@KosmosFult
Copy link
Contributor Author

这里可以测试依赖https://github.com/KosmosFult/cpp-database-mysql-test

.bazelrc Outdated
@@ -0,0 +1,5 @@
build --cxxopt="--std=c++17"
# build --copt=-O2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.bazelrc里,只需要留下面的选项就好

build --cxxopt="--std=c++17"
build --copt=-O2

#include <iostream>
#include <memory>
#include <string>
#include "trpc/util/string_util.h"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不同头文件区块间应该加空格,头文件之间的排布应该是类似这样的,下面以dir2/foo2.cc的头文件引入为例子。

dir2/foo2.h(强关联的头文件,一般.cc文件里写对应.h文件,.h文件里写继承的父类等)
空行
C 系统头文件
空行
C++ 标准库头文件
空行
其他库的 .h文件
(可选)空行
本项目内 .h文件

WORKSPACE Outdated
trpc_workspace()

load("//trpc:workspace.bzl", "database_mysql_workspace")
database_mysql_workspace()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以换成 trpc_database_mysql_workspace

README.md Outdated
mysql_conf.password = "abc123";
mysql_conf.user_name = "root";
mysql_conf.thread_num = 8;
mysql_conf.thread_bind_core = "1, 2-4";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不加空格也能正常解析吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个改一下,不加空格能解析,但加空格反而不太确定行不行,加空格虽然bindcore返回值是正确的,但Split后会有个TryParse(" 2"),不太确定对不对。那这里不允许加空格吧。

@helloopenworld helloopenworld merged commit b7f9714 into trpc-ecosystem:main Jan 17, 2025
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.

3 participants