PostgreSQL connector for sqlpp11 library
sqlpp11 is distributed under the BSD 2-Clause License.
Branch / Compiler | gcc 4.8 | MSVC 2015/2017 |
---|---|---|
master | ||
develop |
An example on how to use this library
auto config = std::make_shared<sqlpp::postgresql::connection_config>();
config->host = "127.0.0.1";
config->user = "someuser";
config->password = "some-random-password";
config->dbname = "somedb";
sqlpp::postgresql::connection db(config);
TabFoo foo;
for(const auto& row: db(select(foo.name, foo.hasFun).from(foo).where(foo.id > 17 and foo.name.like("%bar%"))) {
std::cerr << row.name << std::endl;
}
You can use all possible authentication options that are available in PostgreSQL. See here for more information about the options.