-
Notifications
You must be signed in to change notification settings - Fork 2
【腾讯犀牛鸟开源课题实战】对接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
Conversation
.bazelrc
Outdated
@@ -0,0 +1,5 @@ | |||
build --cxxopt="--std=c++17" | |||
# build --copt=-O2 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以换成 trpc_database_mysql_workspace
# Conflicts: # LICENSE
# Conflicts: # WORKSPACE # cmake/com_github_trpc_cpp.cmake
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里不加空格也能正常解析吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改一下,不加空格能解析,但加空格反而不太确定行不行,加空格虽然bindcore返回值是正确的,但Split后会有个TryParse(" 2"),不太确定对不对。那这里不允许加空格吧。
related issue
mysql service相关主体部分