Skip to content

volka/sqlpp11-connector-postgresql

 
 

Repository files navigation

sqlpp11-connector-postgresql

PostgreSQL connector for sqlpp11 library

License:

sqlpp11 is distributed under the BSD 2-Clause License.

Status:

Branch / Compiler gcc 4.8 MSVC 2015/2017
master Build Status Build status
develop Build Status Build status

Examples

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;
}

Connection configuration

You can use all possible authentication options that are available in PostgreSQL. See here for more information about the options.

About

PostgreSQL connector for sqlpp11 library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.5%
  • CMake 5.9%
  • Python 3.5%
  • C 1.1%