• Stars
    star
    220
  • Rank 174,684 (Top 4 %)
  • Language
    C++
  • License
    PostgreSQL License
  • Created over 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OZO is a C++17 Boost.Asio based header-only library for asyncronous communication with PostgreSQL DBMS.

ozo

Build Status codecov

What's this

OZO is a C++17 library for asyncronous communication with PostgreSQL DBMS. The 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.

API

Since 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:

Compatibilities

For 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 for the details.

Dependencies

These things are needed:

  • CMake is used as build system
  • GCC or Clang C++ compiler with C++17 support (tested with GCC 7.0, Clang 5.0 and Apple LLVM version 9.0.0)
  • Boost >= 1.66 with BOOST_HANA_CONFIG_ENABLE_STRING_UDL defined.
  • libpq >= 9.3
  • Ozo uses the resource_pool library as a git submodule, so in case of using a package version, this dependency should be satisfied too.

If you want to run integration tests and/or build inside Docker container:

  • Docker >= 1.13.0
  • Docker Compose >= 1.10.0

Build

The library is header-only, but if you want to build and run unit-tests you can do it as listed below.

Build and run tests on custom environment

First of all you need to satsfy requirements listed above. You can run tests using these commands.

mkdir -p build
cd build
cmake .. -DOZO_BUILD_TESTS=ON
make -j$(nproc)
ctest -V

Or use build.sh which accepts folowing commands:

scripts/build.sh help

prints help.

scripts/build.sh <compiler> <target>

build and run tests with specified compiler and target, the compiler parameter can be:

  • gcc - for build with gcc,
  • clang - for build with clang.

The target parameter depends on compiler. For gcc:

  • debug - for debug build and tests
  • release - for release build and tests
  • coverage - for code coverage calculation

For clang:

scripts/build.sh all

build all possible configuration.

scripts/build.sh docs

generates documentation.

Build and run tests on MacOS 10.X

For MacOS the best way to satisfy minimum requirements is brew

brew install cmake boost libpq postresql

Build and run tests within Docker

To build code and run tests inside docker container:

scripts/build.sh docker <compiler> <target>

To generate documentation using docker container:

scripts/build.sh docker docs

Test against a local postgres

You can use scripts/build.sh but add pg first:

scripts/build.sh pg <compiler> <target>

or if you want build code in docker:

scripts/build.sh pg docker <compiler> <target>

This will attempt to launch postgres:alpine from your Docker registry. Or you can point ozo tests to a postgres of your choosing by setting these environment variables prior to building:

export OZO_BUILD_PG_TESTS=ON
export OZO_PG_TEST_CONNINFO='your conninfo (connection string)'

scripts/build.sh gcc debug

More Repositories

1

gixy

Nginx configuration static analyzer
Python
8,129
star
2

YaLM-100B

Pretrained language model with 100B parameters
Python
3,716
star
3

odyssey

Scalable PostgreSQL connection pooler
C
3,102
star
4

yandex-tank

Load and performance benchmark tool
Python
2,398
star
5

rep

Machine Learning toolbox for Humans
Jupyter Notebook
678
star
6

pgmigrate

Simple tool to evolve PostgreSQL schema easily.
Python
606
star
7

faster-rnnlm

Faster Recurrent Neural Network Language Modeling Toolkit with Noise Contrastive Estimation and Hierarchical Softmax
C++
561
star
8

tomita-parser

C
492
star
9

porto

Yet another Linux container management system
C++
392
star
10

pandora

A load generator in Go language
Go
383
star
11

reshadow

Markup and styles that feel right
JavaScript
363
star
12

django_replicated

Django DB router for stateful master-slave replication
Python
350
star
13

pire

Perl Incompatible Regular Expressions library
C++
328
star
14

metrica-tag

The client library of the web analytics tool. It is in the top 5 by popularity worldwide.
TypeScript
251
star
15

yatagan

Dependency Injection framework based on Google's Dagger2 API, optimized for fast builds and for managing large graphs with optional dependencies
Kotlin
223
star
16

mapsapi-codestyle

JavaScript and TypeScript Style Guide
JavaScript
213
star
17

zero-downtime-migrations

Apply Django migrations on PostgreSql without long locks on tables
Python
181
star
18

audio-js

Библиотека аудио-плеера для браузера
JavaScript
181
star
19

alice-skills

Примеры кода навыков для голосового помощника, придуманного в Яндексе
Python
178
star
20

burp-molly-scanner

Turn your Burp suite into headless active web application vulnerability scanner
Java
153
star
21

yandex-taxi-testsuite

testsuite: microservices testing framework
Python
144
star
22

burp-molly-pack

Security checks pack for Burp Suite
Java
137
star
23

mapsapi-modules

Async modular system
JavaScript
132
star
24

go-hasql

Go library for accessing multi-host SQL database installations
Go
122
star
25

mapkit-android-demo

MapKit Android demo
Kotlin
115
star
26

yoctodb

A tiny embedded Java-engine for extremely fast partitioned immutable-after-construction databases
Java
107
star
27

scout

A fast and safe manual dependency injector for Kotlin and Android.
Kotlin
102
star
28

handystats

C++ library for collecting user-defined in-process runtime statistics with low overhead
C++
94
star
29

speechkitcloud

Speechkit Cloud examples and SDK
JavaScript
90
star
30

fastops

This small library enables acceleration of bulk calls of certain math functions on AVX and AVX2 hardware. Currently supported operations are exp, log, sigmoid and tanh. The library is designed with extensibility in mind.
C++
82
star
31

yatool

Yatool is a cross-platform distribution, building, testing, and debugging toolkit focused on monorepositories
C
82
star
32

argon2

Implementation of argon2 (i, d, id) algorithms with CPU dispatching
C++
79
star
33

mms

Memory-mapped storage library
C++
76
star
34

mapsapi-heatmap

Heatmap: Yandex.Maps API plugin for data visualization
JavaScript
76
star
35

tcplanz

TCPDump latency analyzer
Python
75
star
36

mapkit-ios-demo

MapKit iOS demo
Swift
75
star
37

balancer

http balancer
C
72
star
38

securitygym

Python
71
star
39

NwSMTP

Asynchronous SMTP proxy server
Shell
71
star
40

geo-reviews-dataset-2023

67
star
41

smart

SMT-aware Real-time scheduler for Linux
C
67
star
42

tex-renderer

Микросервис для рендеринга tex-формул в изображения
JavaScript
59
star
43

rtv

Remote TV control for developers
JavaScript
58
star
44

mysync

MySync is mysql high-availability and cluster configuration tool.
Go
56
star
45

YandexDriver

YandexDriver is a WebDriver implementation
55
star
46

csp-tester

This extension helps web masters to test web application behaviour with Content Security Policy (CSP) ver. 1.0 implemented.
JavaScript
54
star
47

mapsapi-examples

Примеры использования API Яндекс.Карт
JavaScript
52
star
48

yandex_tracker_client

Python client for working with Yandex.Tracker Api
Python
50
star
49

ofd

Реализация протокола взаимодействия ККТ-ОФД
Python
49
star
50

reselector

Use React Components in css selectors
JavaScript
44
star
51

csp-reporter

Content Security Policy logs parser
Python
43
star
52

dpt

BEM-based prototyping framework for large projects
JavaScript
41
star
53

CMICOT

Efficient feature selection method based on Conditional Mutual Information.
C++
41
star
54

pgcheck

Tool for monitoring backend databases from PL/Proxy hosts and changing plproxy.get_cluster_partitions() output
Go
37
star
55

root-2015-tasks

Yandex.Root 2015 contest data
Python
34
star
56

deaf

Android App for Deaf
Java
33
star
57

datasync-js

DataSync API allows for structured data storage and synchronization in Web services and mobile applications.
JavaScript
33
star
58

inet64_tcp

Magic thing to make old Erlang stuff work in IPv6-only networks
Erlang
32
star
59

ymaps-pie-chart-clusterer

Yandex Maps Plugin: Pie Chart Clusterer
JavaScript
31
star
60

browser-extensions

JavaScript
31
star
61

mongoz

An alternative implementation of MongoDB sharding server aimed at high availability
C++
31
star
62

mlcup

Official baseline solutions to Yandex Cup ML challenge
Jupyter Notebook
30
star
63

webmaster.api

28
star
64

mapsapi-polylabeler

Plugin to setting labels inside polygons
JavaScript
25
star
65

mapsapi-round-controls

Plugin for Yandex.Maps JS API: rounded map controls theme
JavaScript
24
star
66

dep_tregex

Stanford Tregex-inspired language for rule-based dependency tree manipulation.
Python
21
star
67

tartifacts

📦 Create artifacts for your assemblies
JavaScript
20
star
68

cggen

Tool for generating Core Graphics code from vector image files
Swift
20
star
69

mastermind

Smart control for a big storage
Python
19
star
70

ch-backup

Backup tool for ClickHouse DBMS
Python
19
star
71

sdch_module

C++
18
star
72

ch-tools

ClickHouse administration and diagnostics tools
Python
17
star
73

openvpn-python-plugin

Runs python3 interpreter inside OpenVPN process in a persistent manner to answer it's plug-in calls.
C
17
star
74

rdsync

Go
17
star
75

YNDX000SB_kernel

Yandex.Phone kernel sources
C
16
star
76

evgen

Code generation for event logging
TypeScript
14
star
77

yandex-ecom-search

Бета-Версия документации для разработчиков по работе с товарным фидом Яндекс Поиска
14
star
78

cluster_metrics

C++
13
star
79

vgsl

Very Good Swift Library
Swift
13
star
80

yamail

YMail General Purpose Library
C++
13
star
81

agglomerative_clustering

C++
13
star
82

temporal-over-ydb

Go
12
star
83

pgconsul

PgConsul is a tool for maintaining High-Availability Postgresql cluster configurations. It is responsible for cluster recovery in case of emergencies.
Python
12
star
84

minishard

Lightweight sharding for distributed erlang applications
Erlang
12
star
85

jsx-directives

Директивы для JSX
TypeScript
12
star
86

miniapp-example

Example application for brand new platform of MiniApps inside the Yandex App
TypeScript
11
star
87

mapsapi-ios

Allows to easily add Yandex.Maps to your existing iOS project using Yandex.Maps JavaScript API
Objective-C
11
star
88

erater

Generic embedded distributed request rate limiting service for erlang applications
Erlang
10
star
89

storytests-cli

Framework agnostic CLI Utility to generate test files from Storybook
TypeScript
10
star
90

mapsapi-area

util.calculateArea: plugin for calculating geodesic features area.
JavaScript
10
star
91

miniapp-example-backend

Backend for Miniapp Example App for brand new platform of MiniApps inside the Yandex App
TypeScript
9
star
92

zest

Библиотека для взаимодействия с бэкендом
TypeScript
9
star
93

opentsdb-flume

Module for flume, allows to write incoming events directly to OpenTSDB.
Java
9
star
94

mediastorage-proxy

Mediastorage-proxy is a HTTP proxy for mediastorage based on elliptics
C++
8
star
95

erateserver

Distributed rate limiting service with HTTP interface
Erlang
7
star
96

domestic-roots-patch

A patch that adds support for the Russian domesic root certificate to the Chromium browser.
6
star
97

libmastermind

Client library for mastermind
C++
6
star
98

opensourcestand

YaC 2014 Open Source Stand
JavaScript
5
star
99

storytests-webpack-plugin

Plugin for creating test files according to Storybook
JavaScript
5
star
100

php-http-signature

PHP Implementation Of Draft RFC HttpSignature (v10)
PHP
5
star