Skip to content

ahmadudin/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

Packages

No packages published

Languages

  • C++ 90.1%
  • CMake 6.0%
  • Python 2.8%
  • C 1.1%