{"id":14973960,"url":"https://github.com/yandex/ozo","last_synced_at":"2025-07-08T06:06:50.164Z","repository":{"id":25764774,"uuid":"106461599","full_name":"yandex/ozo","owner":"yandex","description":"OZO is a C++17 Boost.Asio based header-only library for asyncronous communication with PostgreSQL DBMS.","archived":false,"fork":false,"pushed_at":"2023-03-10T11:40:08.000Z","size":2841,"stargazers_count":229,"open_issues_count":39,"forks_count":46,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-07-08T06:06:42.109Z","etag":null,"topics":["asio","cpp","cpp-library","cpp17","header-only","pgsql","postgres","postgresql","postgresql-driver"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"postgresql","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yandex.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-10T19:24:45.000Z","updated_at":"2025-06-12T14:34:21.000Z","dependencies_parsed_at":"2024-10-11T09:41:32.918Z","dependency_job_id":"930fb29f-ce6d-470c-a5cd-ddcb468a3ae2","html_url":"https://github.com/yandex/ozo","commit_stats":{"total_commits":550,"total_committers":22,"mean_commits":25.0,"dds":0.5563636363636364,"last_synced_commit":"abb098aea4b992b6d06391f892e100d829e50188"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yandex/ozo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex%2Fozo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex%2Fozo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex%2Fozo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex%2Fozo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yandex","download_url":"https://codeload.github.com/yandex/ozo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yandex%2Fozo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264207114,"owners_count":23572731,"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":["asio","cpp","cpp-library","cpp17","header-only","pgsql","postgres","postgresql","postgresql-driver"],"created_at":"2024-09-24T13:49:44.731Z","updated_at":"2025-07-08T06:06:50.145Z","avatar_url":"https://github.com/yandex.png","language":"C++","readme":"# ozo\n\n[![Build Status](https://travis-ci.org/yandex/ozo.svg?branch=master)](https://travis-ci.org/yandex/ozo)\n[![codecov](https://codecov.io/gh/yandex/ozo/branch/master/graph/badge.svg)](https://codecov.io/gh/yandex/ozo)\n\n## What's this\n\nOZO is a C++17 library for asyncronous communication with PostgreSQL DBMS.\nThe library leverages the power of template metaprogramming, providing convenient mapping from C++ types to SQL along with rich query building possibilities. OZO supports different concurrency paradigms (callbacks, futures, coroutines), using Boost.Asio under the hood. Low-level communication with PostgreSQL server is done via libpq. All concepts in the library are designed to be easily extendable (even replaceable) by the user to simplify adaptation to specific project requirements.\n\n### API\n\nSince the project is on early state of development it lacks of documentation. We understand the importance of good docs and are working hard on this problem. Complete documentation is on the way, but now:\n\n* look at our brand new [HOW TO](docs/howto.md),\n* try our [generated from sources documentation](https://yandex.github.io/ozo/) - it is under construction but readable,\n* learn more about main use-cases from [unit tests](tests/integration/request_integration.cpp),\n* See our [C++Now'18 talk about OZO](https://youtu.be/-1zbaxuUsMA) with [presentation](https://github.com/boostcon/cppnow_presentations_2018/blob/master/05-09-2018_wednesday/design_and_implementation_of_dbms_asynchronous_client_library__roman_siromakha__cppnow_05092018.pdf).\n\n## Compatibilities\n\nFor the time OZO is not compatible with new executors models that are used by default since Boost 1.74. The `BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT` macro needs to be defined. See Boost 1.74 [changelog](https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/history.html#boost_asio.history.asio_1_18_0___boost_1_74) for the details.\n## Dependencies\n\nThese things are needed:\n\n* **CMake** is used as build system\n* **GCC** or **Clang** C++ compiler with C++17 support (tested with GCC 7.0, Clang 5.0 and Apple LLVM version 9.0.0)\n* **Boost** \u003e= 1.66 with `BOOST_HANA_CONFIG_ENABLE_STRING_UDL` defined.\n* **libpq** \u003e= 9.3\n* Ozo uses the [resource_pool](https://github.com/elsid/resource_pool) library as a git submodule, so in case of using a package version, this dependency should be satisfied too.\n\nIf you want to run integration tests and/or build inside Docker container:\n* **Docker** \u003e= 1.13.0\n* **Docker Compose** \u003e= 1.10.0\n\n## Build\n\nThe library is header-only, but if you want to build and run unit-tests you can do it as listed below.\n\n### Build and run tests on custom environment\n\nFirst of all you need to satsfy requirements listed above. You can run tests using these commands.\n\n```bash\nmkdir -p build\ncd build\ncmake .. -DOZO_BUILD_TESTS=ON\nmake -j$(nproc)\nctest -V\n```\n\nOr use [build.sh](scripts/build.sh) which accepts folowing commands:\n\n```bash\nscripts/build.sh help\n```\n\nprints help.\n\n```bash\nscripts/build.sh \u003ccompiler\u003e \u003ctarget\u003e\n```\n\nbuild and run tests with specified **compiler** and **target**, the **compiler** parameter can be:\n\n* **gcc** - for build with gcc,\n* **clang** - for build with clang.\n\nThe **target** parameter depends on **compiler**.\nFor **gcc**:\n\n* **debug** - for debug build and tests\n* **release** - for release build and tests\n* **coverage** - for code coverage calculation\n\nFor **clang**:\n\n* **debug** - for debug build and tests\n* **release** - for release build and tests\n* **asan** - for [AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html) launch\n* **ubsan** - for [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) launch\n* **tsan** - for [ThreadSanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) launch\n\n```bash\nscripts/build.sh all\n```\n\nbuild all possible configuration.\n\n```bash\nscripts/build.sh docs\n```\n\ngenerates documentation.\n\n### Build and run tests on MacOS 10.X\n\nFor MacOS the best way to satisfy minimum requirements is [brew](https://brew.sh/)\n\n```bash\nbrew install cmake boost libpq postresql\n```\n\n### Build and run tests within Docker\n\nTo build code and run tests inside docker container:\n\n```bash\nscripts/build.sh docker \u003ccompiler\u003e \u003ctarget\u003e\n```\n\nTo generate documentation using docker container:\n\n```bash\nscripts/build.sh docker docs\n```\n\n### Test against a local postgres\n\nYou can use `scripts/build.sh` but add `pg` first:\n\n```bash\nscripts/build.sh pg \u003ccompiler\u003e \u003ctarget\u003e\n```\n\nor if you want build code in docker:\n\n```bash\nscripts/build.sh pg docker \u003ccompiler\u003e \u003ctarget\u003e\n```\n\nThis will attempt to launch postgres:alpine from your Docker registry.\nOr you can point ozo tests to a postgres of your choosing by setting these environment variables prior to building:\n\n```bash\nexport OZO_BUILD_PG_TESTS=ON\nexport OZO_PG_TEST_CONNINFO='your conninfo (connection string)'\n\nscripts/build.sh gcc debug\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandex%2Fozo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyandex%2Fozo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyandex%2Fozo/lists"}