{"id":17978184,"url":"https://github.com/overv/pqpp","last_synced_at":"2025-03-25T17:31:19.062Z","repository":{"id":56022831,"uuid":"48294217","full_name":"Overv/pqpp","owner":"Overv","description":"Simple PostgreSQL bindings for modern C++","archived":false,"fork":false,"pushed_at":"2020-11-30T17:35:26.000Z","size":10,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-16T17:25:23.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Overv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-19T19:17:41.000Z","updated_at":"2022-06-12T17:30:54.000Z","dependencies_parsed_at":"2022-08-15T11:40:16.911Z","dependency_job_id":null,"html_url":"https://github.com/Overv/pqpp","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overv%2Fpqpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overv%2Fpqpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overv%2Fpqpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Overv%2Fpqpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Overv","download_url":"https://codeload.github.com/Overv/pqpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222088683,"owners_count":16929006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T17:32:08.074Z","updated_at":"2024-10-29T17:32:12.143Z","avatar_url":"https://github.com/Overv.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"pqpp\n====\n\nThis is a header only library with simple libpq bindings for modern C++. It\nprovides the following features:\n\n* Memory safety (libpq objects are managed with `shared_ptr` and `unique_ptr`)\n* Errors are propagated as `runtime_error` exceptions with clear descriptions\n* Rows are returned as column -\u003e value mappings that can be cast to common types\n\nTo do\n-----\n\n* Support for binary data (`BLOB`, `TEXT` with `\\0` bytes)\n* Wrapper for cursors\n\nExample\n-------\n\n```c++\n#include \"pq.hpp\"\n#include \u003ciostream\u003e\n\nint main() {\n    auto db = pq::connection(\"host=127.0.0.1 dbname=test user=test password=test\");\n\n    db.exec(\"CREATE TABLE people (name TEXT, age INTEGER)\");\n\n    auto stmt = db.prepare(\"inserter\", \"INSERT INTO people VALUES ($1, $2)\", 2);\n    db.exec(stmt, \"John\", 26);\n    db.exec(stmt, \"Fred\", 53);\n    db.exec(stmt, \"Lisa\", 37);\n    db.exec(stmt, nullptr, 18);\n\n    auto rows = db.exec(\"SELECT * FROM people ORDER BY age ASC\");\n\n    for (auto\u0026 row : rows) {\n        int age = row[\"age\"];\n        std::string name = row[\"name\"];\n\n        if (!row[\"name\"].is_null()) {\n            std::cout \u003c\u003c name \u003c\u003c \" is \" \u003c\u003c age \u003c\u003c \" years old\" \u003c\u003c std::endl;\n        }\n    }\n\n    db.exec(\"DROP TABLE people\");\n\n    return 0;\n}\n```\n\nLicense\n-------\n\nLicensed using the MIT license.\n\n    Copyright (c) 2015 Alexander Overvoorde\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to\n    deal in the Software without restriction, including without limitation the\n    rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n    sell copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in\n    all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n    IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverv%2Fpqpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foverv%2Fpqpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverv%2Fpqpp/lists"}