PinocchioSql libpqxx QueryBuilder \ BETA VERSION you can use PinocchioSql library for build queries this library require libpqxx take a look at the documentation here