Message from C, C++ discussions

December 2019

— Yea, I've read that. But no way to input password ?

I do sth like this in soci.

string s = fmt::format("db={} user={} password='{}'", cfg.db_name, cfg.db_user, cfg.db_pass);
session sql(soci::mysql, s);

Message permanent page

— 

In drogon, all connections are managed in DbClient, you can think of DbClient object as a connection pool.

— I know that

— You could set password in the connInfo argument.

— It's common design methodology

— One Client, multiple conn.

— Or create the DbClient in configuration file, see https://github.com/an-tao/drogon/wiki/10-Configuration-file#db_clients

Message permanent page

— I've read it all before, didn't want to use "config" file.

— Where it should rightly be.

— Pass='' or password=''

— Auto clientPtr = DbClient::newPgClient(
"host=127.0.0.1 port=5432 dbname=postgres user=postgres password=xxx", 1);

Message permanent page

— Shite, passwd ?