{"id":19492762,"url":"https://github.com/oatpp/oatpp-postgresql","last_synced_at":"2025-04-25T20:30:30.902Z","repository":{"id":44897764,"uuid":"276774870","full_name":"oatpp/oatpp-postgresql","owner":"oatpp","description":"PostgreSQL adapter for oatpp ORM.","archived":false,"fork":false,"pushed_at":"2024-10-09T15:21:38.000Z","size":229,"stargazers_count":18,"open_issues_count":14,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-29T22:54:01.700Z","etag":null,"topics":["cpp","oatpp","orm","postgresql"],"latest_commit_sha":null,"homepage":"https://oatpp.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oatpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-03T00:57:41.000Z","updated_at":"2024-10-09T15:21:46.000Z","dependencies_parsed_at":"2022-09-10T17:40:40.862Z","dependency_job_id":"db60a082-e942-4357-a989-22bab9218efc","html_url":"https://github.com/oatpp/oatpp-postgresql","commit_stats":{"total_commits":77,"total_committers":7,"mean_commits":11.0,"dds":0.2597402597402597,"last_synced_commit":"27031dfeb449a9c88e8218aa60d9e806b2e84bd2"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Foatpp-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Foatpp-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Foatpp-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oatpp%2Foatpp-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oatpp","download_url":"https://codeload.github.com/oatpp/oatpp-postgresql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224015657,"owners_count":17241535,"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":["cpp","oatpp","orm","postgresql"],"created_at":"2024-11-10T21:22:56.206Z","updated_at":"2024-11-10T21:22:57.927Z","avatar_url":"https://github.com/oatpp.png","language":"C++","readme":"# oatpp-postgresql [![Build Status](https://dev.azure.com/lganzzzo/lganzzzo/_apis/build/status/oatpp.oatpp-postgresql?branchName=master)](https://dev.azure.com/lganzzzo/lganzzzo/_build/latest?definitionId=31\u0026branchName=master)\n\nOat++ ORM adapter for PostgreSQL.  \n*Note: this **alpha version**, which means that not all PostgreSQL data-types are supported. See the list of [Supported Data Types](#supported-data-types).*\n\nMore about Oat++:\n\n- [Oat++ Website](https://oatpp.io/)\n- [Oat++ Github Repository](https://github.com/oatpp/oatpp)\n- [Oat++ ORM](https://oatpp.io/docs/components/orm/)\n\n## Build And Install\n\n*Note: you need to install the main [oatpp](https://github.com/oatpp/oatpp) module and PostgreSQL dev package first.*\n\n- Clone this repository.\n- In the root of the repository run:\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   cmake ..\n   make install\n   ```\n   \n## API\n\nDetailed documentation on Oat++ ORM you can find [here](https://oatpp.io/docs/components/orm/).\n\n### Connect to Database\n\nAll you need to start using oatpp ORM with PostgreSQL is to create `oatpp::postgresql::Executor` and provide it to your `DbClient`.\n\n```cpp\n#include \"db/MyClient.hpp\"\n#include \"oatpp-postgresql/orm.hpp\"\n\nclass AppComponent {\npublic:\n  \n  /**\n   * Create DbClient component.\n   */\n  OATPP_CREATE_COMPONENT(std::shared_ptr\u003cdb::MyClient\u003e, myDatabaseClient)([] {\n    /* Create database-specific ConnectionProvider */\n    auto connectionProvider = std::make_shared\u003coatpp::postgresql::ConnectionProvider\u003e(\"\u003cconnection-string\u003e\");    \n  \n    /* Create database-specific ConnectionPool */\n    auto connectionPool = oatpp::postgresql::ConnectionPool::createShared(connectionProvider, \n                                                                          10 /* max-connections */, \n                                                                          std::chrono::seconds(5) /* connection TTL */);\n    \n    /* Create database-specific Executor */\n    auto executor = std::make_shared\u003coatpp::postgresql::Executor\u003e(connectionPool);\n  \n    /* Create MyClient database client */\n    return std::make_shared\u003cMyClient\u003e(executor);\n  }());\n\n};\n```\n\n### Supported Data Types\n\n|Type|Supported|In Array|\n|---|:---:|:---:|\n|INT2|+|+|\n|INT4|+|+|\n|INT8|+|+|\n|TIMESTAMP|+|+|\n|TEXT|+|+|\n|VARCHAR|+|+|\n|FLOAT4|+|+|\n|FLOAT8|+|+|\n|BOOL|+|+|\n|UUID|+|+|\n|**Other Types**|-|-|\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foatpp%2Foatpp-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foatpp%2Foatpp-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foatpp%2Foatpp-postgresql/lists"}