Skip to content

Commit

Permalink
fix get db link
Browse files Browse the repository at this point in the history
  • Loading branch information
hggq committed Jan 5, 2024
1 parent ef117f6 commit 9e83da7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions conf/orm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ type=main
host=127.0.0.1
port=3306
dbname=hello_world
user=root
password=12345678
user=benchmarkdbuser
password=benchmarkdbpass
pretable=
maxpool=5
dbtype=mysql
Expand All @@ -13,8 +13,8 @@ type=second
host=127.0.0.1
port=3306
dbname=hello_world
user=root
password=12345678
user=benchmarkdbuser
password=benchmarkdbpass
pretable=
maxpool=20
dbtype=mysql
Expand Down
10 changes: 8 additions & 2 deletions vendor/httpserver/include/mysqlmodel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,10 @@ class mysqlclientDB : public base
error_msg = "not find orm link tag in pool";
iserror = true;
}
linkconn = iter->second;
else
{
linkconn = iter->second;
}
}
mysqlclientDB() : dbtag(base::_rmstag)
{
Expand All @@ -510,7 +513,10 @@ class mysqlclientDB : public base
error_msg = "not find orm link tag in pool";
iserror = true;
}
linkconn = iter->second;
else
{
linkconn = iter->second;
}
}
model &set_table(std::string table_name)
{
Expand Down

0 comments on commit 9e83da7

Please sign in to comment.