sqlpp11 icon indicating copy to clipboard operation
sqlpp11 copied to clipboard

Update connector documentation

Open Leon0402 opened this issue 4 years ago • 2 comments

Some old documentation here: https://github.com/rbock/sqlpp11/blob/main/docs/Database.md

Leon0402 avatar Dec 31 '21 11:12 Leon0402

How create database object? Guides assume I already installed everything and know everything 🥇

celguar avatar Jan 15 '23 16:01 celguar

The connector-specific tests are a good source of information, see for instance

https://github.com/rbock/sqlpp11/blob/main/tests/mysql/usage/Sample.cpp

  sqlpp::mysql::global_library_init();

  auto config = std::make_shared<mysql::connection_config>();
  config->user = "root";
  config->database = "sqlpp_mysql";
  config->debug = true;
  config->connect_timeout_seconds = 5;
 
  mysql::connection db(config); // This can throw

Hope this helps?

Best, Roland

rbock avatar Jan 16 '23 05:01 rbock