Giter Club home page Giter Club logo

ozo's Introduction

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

ozo's People

Contributors

dpotepalov avatar elsid avatar georgthegreat avatar jonasprogrammer avatar jonesmz avatar koshachy avatar mdyring avatar neogenie avatar neon1ks avatar thed636 avatar timur-ziganshin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ozo's Issues

Does ozo provide a cursor to not fetch all data at once?

Hello,

maybe it's a silly question, but I couldn't find an answer for it reading the docs. So is it possible to execute a query and fetch results row by row, instead of fetching everything at once, for example in case a response contains tons of data?
I saw an implementation of this concept (fetch & cursor) on 'ideas' branch, but this was never merged into master. It was also mentioned on boostcon/cppnow presentation.

Synchronous database calls

Obviously, ozo provides asynchronous API, but is there a way to execute some SQL in a blocking manner? I've tried to perform synchronous, i.e. blocking, call to database, but am not sure how to do that without using any completion handlers. What I did instead was to pass some completion handler to ozo and then call boost::asio's io_context.run_once().
Is there a way to use ozo without boost::asio maybe? Or provide some fake completion handler, that forces application to wait until db call is finished?

Ambiguous call to size function

I have a class:

class BasicSharedString : public std::basic_string_view<CHAR_T>
                        , private boost::shared_ptr<CHAR_T[]>
{ /* ... */ };

I've provided an adapter for this class to OZO.

OZO_PG_BIND_TYPE(meshpp::core::SharedString, "text");

When I use it in a query, I get this error:

/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/write.h:31: error: call to 'size' is ambiguous
out.write(data(in), size(in));
^~~~
From this function

template <typename T>
inline Require<RawDataReadable<T>, ostream&> write(ostream& out, const T& in) {
    using std::data;
    using std::size;
    out.write(data(in), size(in));
    if (!out) {
        throw system_error(error::unexpected_eof);
    }
    return out;
}

And these candidate functions:

One from standard library

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/range_access.h:242: candidate function [with _Container = meshpp::core::BasicSharedString]
size(const _Container& __cont) noexcept(noexcept(__cont.size()))
^

  template <typename _Container>
    constexpr auto
    size(const _Container& __cont) noexcept(noexcept(__cont.size()))
    -> decltype(__cont.size())
    { return __cont.size(); }

One from Boost.

/usr/include/boost/range/size.hpp:55: candidate function [with SinglePassRange = meshpp::core::BasicSharedString]
size(const SinglePassRange& rng)
^

    template<class SinglePassRange>
    inline typename range_size<const SinglePassRange>::type
    size(const SinglePassRange& rng)
    {
// Very strange things happen on some compilers that have the range concept
// asserts disabled. This preprocessor condition is clearly redundant on a
// working compiler but is vital for at least some compilers such as clang 4.2
// but only on the Mac!
#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1
        BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<SinglePassRange>));
#endif

#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
    !BOOST_WORKAROUND(__GNUC__, < 3) \
    /**/
        using namespace range_detail;
#endif

        return range_calculate_size(rng);
    }

I can work around this problem by providing the function "size" in the same namespace as my custom type.

constexpr const char* data(SharedString const& str)
{
    return str.data();
}

constexpr std::size_t size(SharedString const& str)
{
    return str.size();
}

But I would really rather not have to do this.

Is this the intended behavior of OZO? If not, can any adjustments be made?

CMake Error: `resource_pool` is missing.

CMake Error at contrib/CMakeLists.txt:1 (add_subdirectory):
  The source directory

    /usr/local/src/ozo-4bf9f42098cead27d4a3d4c1af2d06eb360f24cb/contrib/resource_pool

  does not contain a CMakeLists.txt file.

This happens when building from an archive of the source code (ie without git).

This is a bit of a speed bump for people trying use this library for the first time. Perhaps documenting resource_pool as a dependency would be useful.

Is it a required dependency?

Thoughts about https://github.com/hotkit/pgasio

I'm curious about the project maintainers of OZO's thoughts regarding the pgasio library.

It's a from-scratch implementation of the postgresql wire protocol.

I know that OZO uses libpq, from Postgresql, directly.

I don't have any specific suggestions or concerns about it, and I'm not trying to imply that OZO should consume pgasio instead of libpq. Really just looking for any first impressions and that's all.

io_context needs to be reset in a connection pool use model

Hello, I am using a connection pool very similar to what Michael showed as an example in request 195:

#195 (comment)

My use is also sporadic and I also dont really care about the callback. Im only writing data and I dont exactly care if
the write failed. Given this use scenario, I'm finding that I need to ioc.restart/ioc.run to actually move jobs along
after an ozo::execute. I can give some psuedo code as an example but I'm wondering if you know of this situation?

I am not using a work_guard currently. I had thought the connection_pool would do the equivalent for me without having to
burn cpu on an empty loop like work_guard.

If you have any suggestions would you please let me know?

thank you,

-mp

Zero as nullptr constant

inline error_code pq_result_error(const PGresult& res) noexcept {
    if (auto s = PQresultErrorField(std::addressof(res), PG_DIAG_SQLSTATE)) {
        return sqlstate::make_error_code(std::strtol(s, NULL, 36));
    }
    return error::no_sql_state_found;
}

Stubbing request

It is very desirable to have a possibility of stubbing or mocking database requests for tests and as the request is a template it is not an easy task.

Is it any recommended way to do this by yandex?

After some research, I found 2 ways to do this:

  1. Write a specialized interface for every specialization of method request what I will need to use.

2)Write a wrapper that takes std::Function object as request implementation.

template <typename Reqfun> class DbManager {
public:
    explicit DbManager(Reqfun fun) : reqImplFun(fun) {
    }

    DbManager(DbManager &) = delete;

    template <typename ConnectionProvider, typename BinaryQueryConvertible, typename TimeConstraint, typename Out,
              typename CompletionToken>
    decltype(auto) request(ConnectionProvider &&provider, BinaryQueryConvertible &&query, TimeConstraint time_constraint, Out out,
                           CompletionToken &&token) {
        return reqImplFun(provider, query, time_constraint, out, token);
    }

private:
    Reqfun reqImplFun;
};

Then it can be passed wrapped by lambda ozo::request for production code

[](auto &&provider, auto &&query, auto time_constraint, auto out, auto &&token) {
    return ozo::request(provider, query, time_constraint, out, token);
};

or stub implementation for tests.

Do you have any better solutions than these above?

Confusing type trait spelling : is_time_constrain

I feel like this should instead be named is_time_constraint.

template <typename T>
struct is_time_constrain : std::false_type {};

/**
 * @brief Time constrain concept
 *
 * `TimeConstraint` is a type which provides information about time restrictions for an operation.
 * Currently supported constrains:
 * * `std::chrono::duration` --- operation time-out duration,
 * * `std::chrono::time_point` --- operation deadline time point,
 * * `ozo::none` --- operation is not restricted in time.
 */
template <typename T>
inline constexpr auto TimeConstraint = is_time_constrain<std::decay_t<T>>::value;

Build requires all of PostgreSQL including server files.

I'm building libpq from source, but your cmake configuration appears to require all of PostgreSQL.

It would be nice to only require the libpq client itself and not server related files.

Here are the errors:

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindPostgreSQL.cmake:225 (find_package_handle_standard_args)
  CMakeLists.txt:11 (find_package)

I'm not sure if this should be pursued with CMake, or perhaps you would be willing to implement a workaround. (or maybe I should just be satisfied to build with the server files present)

Implicit conversion loses integer precision

template <typename T>
inline Require<Integral<T> && sizeof(T) == 1, istream&> read(istream& in, T& out) {
    out = in.get();
    if (!in) {
        throw system_error(error::unexpected_eof);
    }
    return in;
}

ozo/include/ozo/impl/read.h:26: warning: implicit conversion loses integer precision: 'std::basic_istream<char, std::char_traits >::int_type' (aka 'int') to 'char' [-Wimplicit-int-conversion]
out = in.get();
~ ~~~^~~~~

ozo/include/ozo/impl/read.h:51: in instantiation of function template specialization 'ozo::impl::read' requested here
read(in, tmp);
^

My suggestion is to use boost::numeric_cast

Parsing data performance

Hi again!

I did some performance tests ozo(with one connection for equal chances) in comparison to libpq and libpqxx and what I found out is that ozo is very efficient in getting raw data(has no noticeable overhead to libpq(binary protocol), I'm impressed), but it is very inefficient in getting parsed data or parsing data. I look also at performance tests results at your presentation(link) and parsed result was 4 times slower than raw result what it means that parsing is about 3 times slower than getting raw data. It is a very big overhead. And as for most applications in my case, raw binary data are useless.

I also did some tests of only parsing data raw data by function recv_result in ozo. My results in brief:
for -O0:
for strings: libpq 2 times faster than libpqxx and libpqxx 2,5-3 times faster than ozo
for int32: libpq similar result as libpqxx and libpq,libpqxx about 8 times faster than ozo
for int32 and string: libpq 2 times faster than libpqxx and libpqxx 2,5-3 times faster than ozo
results for -O2:
for strings: libpq similar result as libpqxx and libpq,libpqxx 3 times faster than ozo
for int32: libpq 4-5 times faster than libpqxx and libpqxx about 5-6 times faster than ozo
for int32 and string: libpq 1,5 times faster than libpqxx and libpqxx 3-4 times faster than ozo
I would mark that it is not that parsing has negligible overhead, because for most cases it takes more time than getting raw data.
If you are interested in and it will be useful I can share with you more results.

Does yandex see any problem in this area? Is it some way of using ozo to improve this efficiency or does yandex have any plans to improve it?

I'm really impressed with this project. Awesome work! It is far the best candidate to use with coroutines and async programming. I'm asking about it because my team needs to make a decision to choose a technology stack for several projects and we need to make sure that the database library will meet with our requirements and one of them is high efficiency.

Best regards,
Marek

How to retrieve RAISEd error messages

First of all, thank you for this awesome library!
I currently have an issue with getting the cause of a transaction abort within an ozo handler. Neither ec.message() nor ozo::get_error_context seem to do the job, however, as I just get a generic 'transaction aborted' message in both.

Basically I have something like this:

CREATE FUNCTION foo(bar int) [...]
IF bar = 42 THEN RAISE '$err1$ some message' END IF;
IF bar < 0 THEN RAISE '$err2$ other message' END IF;
[...]

And I'm trying to achieve this:

ozo::begin(/*...*/, [](ozo::error_code ec, auto conn) {
  if (ec) return;
  ozo::execute(std::move(conn), "SELECT foo("_SQL + 42 + ")"_SQL, [](ozo::error_code ec, auto conn) {
    if (ec)
    {
        auto err = ec.message(); // ozo::get_error_context(conn) doesn't work either
        // if err contains $err1$ do one thing, do something else otherwise
// ...

Please beware that I'm using a forked version of ozo that works with boost 1.70 (and uses targets in CMake, but that shouldn't change the behaviour of a header only lib), so if this approach should work with vanilla ozo, please tell me, so I can look where I screwed up.

Custom transaction begin statement

Hi,

I have a question regarding ozo::begin(): Currently the executed seems to be hardcoded to BEGIN. Is there any customization point for this? For now I simply copied the definition of begin and begin_op with a new name, but this is not really a solution.

Specifically, I need certain transactions to be SERIALIZABLE, whilst others are READONLY. While SET can do this as well, I don't see the point in sending two commands to the server when one would do.

If there is no such customization point, I'd be happy to help with a PR.

Thanks in advance

Inefficent string concatination in __OZO_SQLSTATE

#define __OZO_SQLSTATE_NAME(value) case value: return std::string(#value) + "(" + detail::ltob36(value) + ")";

The C++ language performs this string concatenation like this:

std::string value1 = std::string(#value) + "(";
std::string value2 = value1 + detail::ltob36(value);
std::string value3 = value2 + ")";

Meaning that for every operator+ call, an allocation and a copy of the previous string data, plus the new string data, occurs.

In this case, we experience at least 3 allocations (one each for value1, value2, and value3), and three copies of #value

See this file: https://github.com/splinter-build/splinter/blob/10-string_concat/src/string_piece_util.h

The string_concat (Very bottom of file) function will accomplish this string concatenation operation with a single allocation, and a single copy of each byte.

All of the functions in that file starting with pairwise_for_each and below (The part of the file above pairwise_for_each are not mine), are copyright myself, and are available to OZO under the PostgreSQL license.

Replace BOOST_FUSION_ADAPT_STRUCT with BOOST_HANA_ADAPT_STRUCT in examples

Since ozo already explicitly depends on Boost.Hana, I think it makes sense to provide examples for adapting structs that use Boost.Hana instead of Boost.Fusion.

My motivation behind recommending this is actually that I ran into a problem including BOOST_FUSION_ADAPT_STRUCT in the same translation unit as a Boost.MultiIndex container. It causes a compiler error, no idea why. However, BOOST_HANA_ADAPT_STRUCT doesn't have the same problem.

Codecov.io check is off :(

Due to problems with code coverage information handling by Codecov.io we switched off coverage check for a while.

The PR is #110

We will revert this PR after the problems will be solved.

Reduce C++ requirement to C++11/14

Why there C++17 is needed?
Can reduce it to C++11/14 ?

Because, C++17 is very fresh standard, where not supported most compilers.

Most common Linux servers (Centos 6/7, Debian 8/9) have old GCC compilers ( gcc 4.7, gcc 4.8, gcc 5), which are not supported C++17.

Support of hana-defined struct in queries

Hi,

I am trying reading a group of columns into one struct.

The example using BOOST_FUSION_DEFINE_STRUCT in the following link works well.
https://github.com/yandex/ozo/blob/master/docs/howto.md#how-start-to-do-not-bother-with-types-sequence-in-row-but-begin-to-bother-about-column-names

However, when I use BOOST_HANA_DEFINE_STRUCT, it gives the following error message:

In file included from /usr/local/include/boost/hana.hpp:134:
/usr/local/include/boost/hana/map.hpp:479:13: error: static_assert failed due to requirement '!decltype(hana::is_nothing(MaybeIndex{}))::value' "hana::at_key(map, key) requires the
'key' to be present in the 'map'"
static_assert(!decltype(hana::is_nothing(MaybeIndex{}))::value,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/hana/at_key.hpp:51:23: note: in instantiation of function template specialization 'boost::hana::at_key_impl<boost::hana::map_tag, void>::apply<const
boost::hana::detail::map_impl<boost::hana::detail::hash_table<>, boost::hana::basic_tuple<> > &, boost::hana::type_implnibashared::attributes::>' requested here
return AtKey::apply(static_cast<Xs&&>(xs), key);
^
/usr/local/include/boost/hana/detail/operators/searchable.hpp:34:20: note: in instantiation of function template specialization 'boost::hana::at_key_t::operator()<const
boost::hana::detail::map_impl<boost::hana::detail::hash_table<>, boost::hana::basic_tuple<> > &, boost::hana::type_implnibashared::attributes::
>' requested here
return hana::at_key(static_cast<Derived const&>(*this),
^

Is BOOST_HANA_DEFINE_STRUCT not supported? Thanks in advance.

Clang 9: Warnings about class template argument deduction

/home/jonesmz/meshpp_frameworks/exe/cloud-controller/main.cpp:514:39: warning: 'connection_info' may not intend to support class template argument deduction [-Wctad-maybe-unsupported]
ozo::connection_info<> connInfo = ozo::connection_info(vm["db-connection-string"].asstd::string());
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection_info.h:24:7: note: add a deduction guide to suppress this warning
class connection_info {
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection_info.h:5:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/async_connect.h:7:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/request_oid_map.h:3:

field name or index with bad_result_process error

In a complected select query, An error message like the following makes it very hard to understand which field has a wrong type. And it takes time to find out the one which is wrong.

unexpected oid 19 for type long: no conversion possible from oid to user-supplied type

Is it possible to to have the field name or at least the field index attached with the error message ?

Standalone asio

Хотелось бы без буста мочь ее юзать.

Using custom struct that models hana sequence

I've a custom tuple like class that models, hana Comparable, Foldable, and Iterable. I want to use that instead of using tuple. Do I need to implement any other concept if I want only index based access ? What do I need to do to tell ozo to use that class instead of using tuple ?

Using string_view

Is it feasible to somehow use std::string_view for retrieving results from db and can it be possibly faster than std::string? I've tried to form ozo::rows_of with std::string_view, but I cannot get it to compile.

Coroutines + asio

No examples with coroutines_ts. If it possible to use your library with co_await etc it would be great (dont like callback hell even with lamdas).

inserting a bytea

Do you mind showing us what's the best way to insert a bytea field into the database?
ozo::pg::bytea does not work due to the wrapper missing size()/data() and we couldn't build a query with it. Thanks in advance.

Request for explanation how to use OZO_PG_BIND_TYPE with timestamptz

I'm using the ICU library for managing timestamps.

The timestamps are composed of:

Which is the best way to map it to a timestamptz with OZO_PG_BIND_TYPE?

Should I simply format my timestamps to ISO8601 strings like YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00) and then bind them as strings?

Or can I write C++ mapping code to map my timestamps to 8 bytes binary representation of timestamptz? And if yes, how is a timestamptz represented in binary form?

I'm mainly interested in one way binding (ICU timestamps => Postgresql) for INSERTs and UPDATEs and for use in WHERE clauses, not the other way as SELECT results.

Compile failure with new ostream code

This is a new issue.

Am I missing a header file or something?

Notably, I get this error on gcc 9.2, but I don't get this error with clang 9.

In file included from /workspace/3rdparty/ozo/include/ozo/io/send.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std/nullopt_t.h:5,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std.h:12,
                 from /workspace/3rdparty/ozo/include/ozo/io/binary_query.h:3,
                 from /workspace/3rdparty/ozo/include/ozo/impl/io.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_request.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_execute.h:4,
                 from /workspace/3rdparty/ozo/include/ozo/execute.h:3,
                 from /workspace/inc/application/db/execute_pipeline.h:16,
                 from /workspace/inc/application/controller/telemetry_data_controller.h:9,
                 from /workspace/lib/controller/telemetry_data_controller.cpp:4:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h: In instantiation of ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   required from ‘ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)> [with auto:26 = application::BasicSharedString<char>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/stl_algo.h:3876:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const application::BasicSharedString<char>*, std::vector<application::BasicSharedString<char> > >; _Funct = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)>]’
/usr/include/boost/range/algorithm/for_each.hpp:102:6:   required from ‘UnaryFunction boost::range::for_each(const SinglePassRange&, UnaryFunction) [with SinglePassRange = std::vector<application::BasicSharedString<char> >; UnaryFunction = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:24:   [ skipping 47 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:151:49:   required from ‘static boost::asio::async_result<CompletionToken, Signature>::return_type boost::asio::async_result<CompletionToken, Signature>::initiate(Initiation&&, RawCompletionToken&&, Args&& ...) [with Initiation = ozo::detail::initiate_async_execute; RawCompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); boost::asio::async_result<CompletionToken, Signature>::return_type = void]’
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_execute; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/execute.h:53:69:   required from ‘decltype(auto) ozo::execute_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >; TimeConstraint = std::chrono::duration<long int>; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Initiator = ozo::detail::initiate_async_execute]’
/workspace/inc/application/db/execute_pipeline.h:221:17:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/inc/application/db/execute_pipeline.h:158:5:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute(std::any, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}; PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/lib/controller/telemetry_data_controller.cpp:39:113:   required from here
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:51:25: error: no matching function for call to ‘ozo::ostream::write(ozo::detail::typed_buffer<int>&)’
   51 |         return write(buf);
      |                         ^
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:25:14: note: candidate: ‘ozo::ostream& ozo::ostream::write(const char_type*, std::streamsize)’
   25 |     ostream& write(const char_type* s, std::streamsize n) {
      |              ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:25:14: note:   candidate expects 2 arguments, 1 provided
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54: note: candidate: ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) == 1)), ozo::ostream&> ozo::ostream::write(T)’
   36 |     Require<Integral<T> && sizeof(T) == 1, ostream&> write(T in) {
      |                                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/hana/detail/decay.hpp:16,
                 from /usr/include/boost/hana/pair.hpp:16,
                 from /usr/include/boost/hana/detail/struct_macros.hpp:27,
                 from /usr/include/boost/hana/define_struct.hpp:15,
                 from /workspace/inc/application/controller/telemetry_config_interfaces.h:8,
                 from /workspace/inc/application/controller/telemetry_data_controller.h:7,
                 from /workspace/lib/controller/telemetry_data_controller.cpp:4:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/core/concept.h:56:7:   required by substitution of ‘template<bool Condition, class Type> using Require = std::enable_if_t<Condition, Type> [with bool Condition = (((bool)ozo::Integral<ozo::detail::typed_buffer<int> >) && (sizeof (ozo::detail::typed_buffer<int>) == 1)); Type = ozo::ostream&]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54:   required by substitution of ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) == 1)), ozo::ostream&> ozo::ostream::write(T) [with T = ozo::detail::typed_buffer<int>]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:51:25:   required from ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   [ skipping 50 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:151:49:   required from ‘static boost::asio::async_result<CompletionToken, Signature>::return_type boost::asio::async_result<CompletionToken, Signature>::initiate(Initiation&&, RawCompletionToken&&, Args&& ...) [with Initiation = ozo::detail::initiate_async_execute; RawCompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); boost::asio::async_result<CompletionToken, Signature>::return_type = void]’
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_execute; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/execute.h:53:69:   required from ‘decltype(auto) ozo::execute_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >; TimeConstraint = std::chrono::duration<long int>; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Initiator = ozo::detail::initiate_async_execute]’
/workspace/inc/application/db/execute_pipeline.h:221:17:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/inc/application/db/execute_pipeline.h:158:5:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute(std::any, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}; PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/lib/controller/telemetry_data_controller.cpp:39:113:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/type_traits:2384:11: error: no type named ‘type’ in ‘struct std::enable_if<false, ozo::ostream&>’
 2384 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
In file included from /workspace/3rdparty/ozo/include/ozo/io/send.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std/nullopt_t.h:5,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std.h:12,
                 from /workspace/3rdparty/ozo/include/ozo/io/binary_query.h:3,
                 from /workspace/3rdparty/ozo/include/ozo/impl/io.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_request.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_execute.h:4,
                 from /workspace/3rdparty/ozo/include/ozo/execute.h:3,
                 from /workspace/inc/application/db/execute_pipeline.h:16,
                 from /workspace/inc/application/controller/telemetry_data_controller.h:9,
                 from /workspace/lib/controller/telemetry_data_controller.cpp:4:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h: In instantiation of ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   required from ‘ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)> [with auto:26 = application::BasicSharedString<char>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/stl_algo.h:3876:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const application::BasicSharedString<char>*, std::vector<application::BasicSharedString<char> > >; _Funct = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)>]’
/usr/include/boost/range/algorithm/for_each.hpp:102:6:   required from ‘UnaryFunction boost::range::for_each(const SinglePassRange&, UnaryFunction) [with SinglePassRange = std::vector<application::BasicSharedString<char> >; UnaryFunction = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:26&)>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:24:   [ skipping 47 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:151:49:   required from ‘static boost::asio::async_result<CompletionToken, Signature>::return_type boost::asio::async_result<CompletionToken, Signature>::initiate(Initiation&&, RawCompletionToken&&, Args&& ...) [with Initiation = ozo::detail::initiate_async_execute; RawCompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); boost::asio::async_result<CompletionToken, Signature>::return_type = void]’
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_execute; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/execute.h:53:69:   required from ‘decltype(auto) ozo::execute_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > >, std::reference_wrapper<std::vector<std::optional<application::BasicSharedString<char> >, std::allocator<std::optional<application::BasicSharedString<char> > > > > >; TimeConstraint = std::chrono::duration<long int>; CompletionToken = application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]::<lambda(ozo::error_code, auto:45)>; Initiator = ozo::detail::initiate_async_execute]’
/workspace/inc/application/db/execute_pipeline.h:221:17:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute_impl(std::any) [with PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/inc/application/db/execute_pipeline.h:158:5:   required from ‘void application::ExecutePipeline<PARAMS_T>::execute(std::any, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}; PARAMS_T = {application::BasicSharedString<char>, application::BasicSharedString<char>, std::optional<application::BasicSharedString<char> >}]’
/workspace/lib/controller/telemetry_data_controller.cpp:39:113:   required from here
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:41:43: note: candidate: ‘template<class T> ozo::Require<RawDataReadable<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   41 |     Require<RawDataReadable<T>, ostream&> write(const T& in) {
      |                                           ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:41:43: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:48:54: note: candidate: ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T)’
   48 |     Require<Integral<T> && sizeof(T) != 1, ostream&> write(T in) {
      |                                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:48:54: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:55:41: note: candidate: ‘template<class T> ozo::Require<FloatingPoint<T>, ozo::ostream&> ozo::ostream::write(T)’
   55 |     Require<FloatingPoint<T>, ostream&> write(T in) {
      |                                         ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:55:41: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:59:14: note: candidate: ‘ozo::ostream& ozo::ostream::write(bool)’
   59 |     ostream& write(bool in) {
      |              ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:59:25: note:   no known conversion for argument 1 from ‘ozo::detail::typed_buffer<int>’ to ‘bool’
   59 |     ostream& write(bool in) {
      |                    ~~~~~^~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:65:40: note: candidate: ‘template<class T> ozo::Require<HanaSequence<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   65 |     Require<HanaSequence<T>, ostream&> write(const T& in) {
      |                                        ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:65:40: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:71:38: note: candidate: ‘template<class T> ozo::Require<HanaStruct<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   71 |     Require<HanaStruct<T>, ostream&> write(const T& in) {
      |                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:71:38: note:   template argument deduction/substitution failed:
In file included from /workspace/3rdparty/ozo/include/ozo/io/send.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std/nullopt_t.h:5,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std.h:12,
                 from /workspace/3rdparty/ozo/include/ozo/io/binary_query.h:3,
                 from /workspace/3rdparty/ozo/include/ozo/impl/io.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_request.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/request.h:3,
                 from /workspace/inc/application/db/request.h:7,
                 from /workspace/inc/application/db/request_pipeline.h:7,
                 from /workspace/inc/application/controller/device_configuration_view.h:10,
                 from /workspace/lib/controller/device_configuration_view.cpp:5:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h: In instantiation of ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   required from ‘ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)> [with auto:19 = application::BasicSharedString<char>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/stl_algo.h:3876:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const application::BasicSharedString<char>*, std::vector<application::BasicSharedString<char> > >; _Funct = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)>]’
/usr/include/boost/range/algorithm/for_each.hpp:102:6:   required from ‘UnaryFunction boost::range::for_each(const SinglePassRange&, UnaryFunction) [with SinglePassRange = std::vector<application::BasicSharedString<char> >; UnaryFunction = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:24:   [ skipping 49 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_request; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >, std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/request.h:94:69:   required from ‘decltype(auto) ozo::request_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, Out, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TimeConstraint = std::chrono::duration<long int>; Out = std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >; CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Initiator = ozo::detail::initiate_async_request]’
/workspace/inc/application/db/request.h:87:24:   required from ‘decltype(auto) application::request(CONNECTION_T&&, QUERY_T&&, TIMEOUT_T&&, HANDLER_T&&) [with RETURN_T = std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >; CONNECTION_T = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; QUERY_T = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TIMEOUT_T = std::chrono::duration<long int>; HANDLER_T = application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)>]’
/workspace/inc/application/db/request_pipeline.h:248:47:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]’
/workspace/inc/application/db/request_pipeline.h:166:5:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request(std::any, application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>}; RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}; application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t = std::function<void(std::error_code, application::DeviceConfig)>]’
/workspace/lib/controller/device_configuration_view.cpp:24:105:   required from here
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:51:25: error: no matching function for call to ‘ozo::ostream::write(ozo::detail::typed_buffer<int>&)’
   51 |         return write(buf);
      |                         ^
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:25:14: note: candidate: ‘ozo::ostream& ozo::ostream::write(const char_type*, std::streamsize)’
   25 |     ostream& write(const char_type* s, std::streamsize n) {
      |              ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:25:14: note:   candidate expects 2 arguments, 1 provided
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54: note: candidate: ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) == 1)), ozo::ostream&> ozo::ostream::write(T)’
   36 |     Require<Integral<T> && sizeof(T) == 1, ostream&> write(T in) {
      |                                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54: note:   template argument deduction/substitution failed:
In file included from /usr/include/boost/hana/detail/decay.hpp:16,
                 from /usr/include/boost/hana/pair.hpp:16,
                 from /usr/include/boost/hana/detail/struct_macros.hpp:27,
                 from /usr/include/boost/hana/define_struct.hpp:15,
                 from /workspace/inc/application/controller/telemetry_config_interfaces.h:8,
                 from /workspace/inc/application/controller/device_configuration_view.h:7,
                 from /workspace/lib/controller/device_configuration_view.cpp:5:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/core/concept.h:56:7:   required by substitution of ‘template<bool Condition, class Type> using Require = std::enable_if_t<Condition, Type> [with bool Condition = (((bool)ozo::Integral<ozo::detail::typed_buffer<int> >) && (sizeof (ozo::detail::typed_buffer<int>) == 1)); Type = ozo::ostream&]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:36:54:   required by substitution of ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) == 1)), ozo::ostream&> ozo::ostream::write(T) [with T = ozo::detail::typed_buffer<int>]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:51:25:   required from ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   [ skipping 52 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_request; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >, std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/request.h:94:69:   required from ‘decltype(auto) ozo::request_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, Out, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TimeConstraint = std::chrono::duration<long int>; Out = std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >; CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Initiator = ozo::detail::initiate_async_request]’
/workspace/inc/application/db/request.h:87:24:   required from ‘decltype(auto) application::request(CONNECTION_T&&, QUERY_T&&, TIMEOUT_T&&, HANDLER_T&&) [with RETURN_T = std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >; CONNECTION_T = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; QUERY_T = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TIMEOUT_T = std::chrono::duration<long int>; HANDLER_T = application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)>]’
/workspace/inc/application/db/request_pipeline.h:248:47:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]’
/workspace/inc/application/db/request_pipeline.h:166:5:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request(std::any, application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>}; RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}; application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t = std::function<void(std::error_code, application::DeviceConfig)>]’
/workspace/lib/controller/device_configuration_view.cpp:24:105:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/type_traits:2384:11: error: no type named ‘type’ in ‘struct std::enable_if<false, ozo::ostream&>’
 2384 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
In file included from /workspace/3rdparty/ozo/include/ozo/io/send.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std/nullopt_t.h:5,
                 from /workspace/3rdparty/ozo/include/ozo/ext/std.h:12,
                 from /workspace/3rdparty/ozo/include/ozo/io/binary_query.h:3,
                 from /workspace/3rdparty/ozo/include/ozo/impl/io.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/impl/async_request.h:6,
                 from /workspace/3rdparty/ozo/include/ozo/request.h:3,
                 from /workspace/inc/application/db/request.h:7,
                 from /workspace/inc/application/db/request_pipeline.h:7,
                 from /workspace/inc/application/controller/device_configuration_view.h:10,
                 from /workspace/lib/controller/device_configuration_view.cpp:5:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h: In instantiation of ‘ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T) [with T = int; ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> = ozo::ostream&]’:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:81:45:   required from ‘ozo::ostream& ozo::write(ozo::ostream&, Ts&& ...) [with Ts = {int}]’
/workspace/3rdparty/ozo/include/ozo/io/send.h:112:10:   required from ‘ozo::ostream& ozo::send_data_frame(ozo::ostream&, const OidMap&, const In&) [with OidMap = ozo::oid_map_t<>; In = application::BasicSharedString<char>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:66:   required from ‘ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)> [with auto:19 = application::BasicSharedString<char>]’
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/stl_algo.h:3876:5:   required from ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = __gnu_cxx::__normal_iterator<const application::BasicSharedString<char>*, std::vector<application::BasicSharedString<char> > >; _Funct = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)>]’
/usr/include/boost/range/algorithm/for_each.hpp:102:6:   required from ‘UnaryFunction boost::range::for_each(const SinglePassRange&, UnaryFunction) [with SinglePassRange = std::vector<application::BasicSharedString<char> >; UnaryFunction = ozo::detail::send_array_impl<T>::apply(ozo::ostream&, const OidMap&, const T&) [with OidMap = ozo::oid_map_t<>; T = std::vector<application::BasicSharedString<char> >]::<lambda(const auto:19&)>]’
/workspace/3rdparty/ozo/include/ozo/io/array.h:121:24:   [ skipping 49 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_request; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<ozo::oid_map_t<>, ozo::none_t> >&>, std::chrono::duration<long int, std::ratio<1, 1> >&, ozo::impl::query<std::basic_string_view<char, std::char_traits<char> >, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >, std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&>)()...))>::type = void]’
/workspace/3rdparty/ozo/include/ozo/request.h:94:69:   required from ‘decltype(auto) ozo::request_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, Out, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; Q = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TimeConstraint = std::chrono::duration<long int>; Out = std::back_insert_iterator<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> > >; CompletionToken = application::impl::RequestWrapper<std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >, application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)> >; Initiator = ozo::detail::initiate_async_request]’
/workspace/inc/application/db/request.h:87:24:   required from ‘decltype(auto) application::request(CONNECTION_T&&, QUERY_T&&, TIMEOUT_T&&, HANDLER_T&&) [with RETURN_T = std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >; CONNECTION_T = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<> >&>; QUERY_T = ozo::impl::query<std::basic_string_view<char>, std::reference_wrapper<std::vector<application::BasicSharedString<char>, std::allocator<application::BasicSharedString<char> > > > >; TIMEOUT_T = std::chrono::duration<long int>; HANDLER_T = application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]::<lambda(ozo::error_code, auto:45, std::vector<application::DeviceConfig, std::allocator<application::DeviceConfig> >)>]’
/workspace/inc/application/db/request_pipeline.h:248:47:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request_impl(std::any) [with RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}]’
/workspace/inc/application/db/request_pipeline.h:166:5:   required from ‘void application::RequestPipeline<RETURN_T, PARAMS_T>::request(std::any, application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t, ARGS_T&& ...) [with ARGS_T = {application::BasicSharedString<char>}; RETURN_T = application::DeviceConfig; PARAMS_T = {application::BasicSharedString<char>}; application::RequestPipeline<RETURN_T, PARAMS_T>::Callback_t = std::function<void(std::error_code, application::DeviceConfig)>]’
/workspace/lib/controller/device_configuration_view.cpp:24:105:   required from here
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:41:43: note: candidate: ‘template<class T> ozo::Require<RawDataReadable<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   41 |     Require<RawDataReadable<T>, ostream&> write(const T& in) {
      |                                           ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:41:43: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:48:54: note: candidate: ‘template<class T> ozo::Require<(Integral<T> && (sizeof (T) != 1)), ozo::ostream&> ozo::ostream::write(T)’
   48 |     Require<Integral<T> && sizeof(T) != 1, ostream&> write(T in) {
      |                                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:48:54: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:55:41: note: candidate: ‘template<class T> ozo::Require<FloatingPoint<T>, ozo::ostream&> ozo::ostream::write(T)’
   55 |     Require<FloatingPoint<T>, ostream&> write(T in) {
      |                                         ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:55:41: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:59:14: note: candidate: ‘ozo::ostream& ozo::ostream::write(bool)’
   59 |     ostream& write(bool in) {
      |              ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:59:25: note:   no known conversion for argument 1 from ‘ozo::detail::typed_buffer<int>’ to ‘bool’
   59 |     ostream& write(bool in) {
      |                    ~~~~~^~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:65:40: note: candidate: ‘template<class T> ozo::Require<HanaSequence<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   65 |     Require<HanaSequence<T>, ostream&> write(const T& in) {
      |                                        ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:65:40: note:   template argument deduction/substitution failed:
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:71:38: note: candidate: ‘template<class T> ozo::Require<HanaStruct<T>, ozo::ostream&> ozo::ostream::write(const T&)’
   71 |     Require<HanaStruct<T>, ostream&> write(const T& in) {
      |                                      ^~~~~
/workspace/3rdparty/ozo/include/ozo/io/ostream.h:71:38: note:   template argument deduction/substitution failed:
gmake[2]: *** [lib/controller/CMakeFiles/controller.dir/build.make:89: lib/controller/CMakeFiles/controller.dir/telemetry_data_controller.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [lib/controller/CMakeFiles/controller.dir/build.make:76: lib/controller/CMakeFiles/controller.dir/device_configuration_view.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1089: lib/controller/CMakeFiles/controller.dir/all] Error 2
gmake: *** [Makefile:130: all] Error 2

How to build INSERT query with multiple rows?

Postgres supports one INSERT statement has multiple values / rows.

How can I build such query in ozo given that I don't know the number of rows in advance?

INSERT INTO test (a, b) VALUES (1, 2) (3, 4) (5, 6);

Warning about unannotated fallthrough in switch-case.

I get this warning on both Clang++8, and Clang++9.

Issue also reported upstream to Boost: boostorg/asio#310

I'm not sure how to fix this.

In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection_info.h:5:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/async_connect.h:7:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/request_oid_map.h:3:
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/impl/async_request.h:209:25: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
yield get_connection(ctx_).async_wait_read(std::move(*this));
^
/usr/include/boost/asio/yield.hpp:18:16: note: expanded from macro 'yield'
# define yield BOOST_ASIO_CORO_YIELD
^
/usr/include/boost/asio/coroutine.hpp:326:32: note: expanded from macro 'BOOST_ASIO_CORO_YIELD'
# define BOOST_ASIO_CORO_YIELD BOOST_ASIO_CORO_YIELD_IMPL(LINE)
^
/usr/include/boost/asio/coroutine.hpp:300:7: note: expanded from macro 'BOOST_ASIO_CORO_YIELD_IMPL'
case (n): ;
^

Support for 'timestamp without time zone' type

I am trying to wrap my head around working with timestamps. I have a database that has a field of type 'timestamp without time zone' which I want to query using ozo.

The most obvious C++ type for this would be an std::chrono::system_clock::time_point. Unfortunately, that didn't immediately work as I had hoped, so I have started looking into how to get this to work.

Some research showed me that a timestamp field in PostgreSQL is basically the number of microseconds since the PostgreSQL epoch - which is defined as the start of this millennia (2000-01-01 00:00:00).

I can get this value out in some sense, I first tried to do OZO_PG_BIND_TYPE(int64_t, "timestamp"); which fails due to the fact that uint64_t is already taken for something else. I couldn't get this to work using the so-called strong typedef macro, but I got it to bind to uint64_t instead - which works as long as the date is in 2000 or later.

If I then use this value in the constructor to std::chrono::microseconds and add it to the epoch value I get the right result. What I have trouble is in gluing this together so I can just read the value directly into an std::chrono::system_clock::time_point.

Since it is a type from the STL and I can't edit it, I assume I would have to somehow write an adapter function that wraps the conversion going from either postgres to c++ type and vice-versa. I cannot, however, find out how I am expected to do this.

Can anybody give me some pointer as to how to properly integrate this.

Boost 1.65 support?

Is it at all possible to support Boost 1.65? My Linux distribution does not supply 1.66 at this time.

Clang 9, lots of warnings about non-static variables in headers.

Long story short: Ozo has lots of template variables declared in header files where the value of the variable is the result of a type_traits's evaluation.

E.g.:

template <typename T>
constexpr auto OutputIterator = is_output_iterator<T>::value;

Clang is warning about this because a globally defined variable like this should either have an "extern" declaration before it, or be static. Otherwise from the compiler's perspective, you risk violating the one-definition-rule.

Replacing these template-variables with "using" declarations will resolve the complaint from clang.

Full text of warning follows.

In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection_info.h:3:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connector.h:4:
In file included from /home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/connection.h:8:
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:28:16: warning: no previous extern declaration for non-static variable 'IsNone<std::chrono::duration<long, std::ratio<1, 1000000000> > >' [-Wmissing-variable-declarations]
constexpr auto IsNone = is_none::value;
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:33:43: note: in instantiation of variable template specialization 'ozo::IsNone' requested here
template <typename T, typename = Require<!IsNone>>
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:34:23: note: in instantiation of default argument for 'operator==<std::chrono::duration<long, std::ratio<1, 1000000000> > >' required here
inline constexpr bool operator == (const T&, const none_t&) { return false;}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/deadline.h:107:30: note: while substituting deduced template arguments into function template 'operator==' [with T = std::chrono::duration<long, std::ratio<1, 1000000000> >, $1 = (no value)]
return time_left(t, now) == time_traits::duration(0);
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:28:11: note: declare 'static' if the variable is not intended to be used outside of this translation unit
constexpr auto IsNone = is_none::value;
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:28:16: warning: no previous extern declaration for non-static variable 'IsNoneozo::detail::endian' [-Wmissing-variable-declarations]
constexpr auto IsNone = is_none::value;
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:33:43: note: in instantiation of variable template specialization 'ozo::IsNone' requested here
template <typename T, typename = Require<!IsNone>>
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:34:23: note: in instantiation of default argument for 'operator==ozo::detail::endian' required here
inline constexpr bool operator == (const T&, const none_t&) { return false;}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/detail/endian.h:27:34: note: while substituting deduced template arguments into function template 'operator==' [with T = ozo::detail::endian, $1 = (no value)]
constexpr Require<endian::native == endian::little, U> convert_to_big_endian(T value) noexcept {
^
/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/core/none.h:28:11: note: declare 'static' if the variable is not intended to be used outside of this translation unit
constexpr auto IsNone = is_none::value;
^

Build fails with Boost.ASIO 1.74

There is some issue with executors in latest Boost.Asio version. Looks like the problem is that the default executor now is a specialization of boost::asio::any_executor template which is incompatible with boost::asio::executor as they model the different Executor concepts. Looks like the problem is in resource_pool library - https://github.com/elsid/resource_pool/blob/6a4074465cc672fc1999035ef3e851d7c250134c/include/yamail/resource_pool/async/detail/pool_impl.hpp#L105

Borrowing connection from ozo::connection_pool

Hello,

is it possible to 'borrow' a connection from ozo::connection_pool? What I mean by 'borrowing' is this: lets say I have an ozo::connection_pool configured for 4 connections. Now I would like to take 1 connection outside and use it however I want to, so that connection_pool could operate only on remaining 3 connections. In the end I would return borrowed connection, so the connection_pool would have 4 connections again. I couldn't find such functionality by browsing documentation/src/tests, but maybe it exists already and I've missed it. I also know that I could have a separate connection besides connection pool, but I'm interested in keeping fixed number of connections opened.

Feature Request: Examples that don't use Boost.Coroutine

Boost.Coroutine is, clearly, an extremely powerful framework. However, I am in a situation where adopting Boost.Coroutine is not currently an option.

I would like to see examples that don't use coroutines, that accomplish similar things to what's found here: https://github.com/yandex/ozo/blob/master/examples/request.cpp

For my situation, I am attempting to use OZO to replace libpqxx. Both OZO and libpqxx use the PostgreSQL provided "libpq" to run the underlying database operations, so they should be equally reliable and safe to use. The major difference, of course, is that OZO is asynchronous, and I've identified libpqxx's synchronous behavior as a major bottleneck in my application.

My program is currently structured like this:

// Header
struct ControllerV2
{
    ControllerV2(boost::asio::io_context & ioc, std::shared_ptr<pqxx::connection> pDbConn);
    boost::asio::io_context & m_ioc;
    std::shared_ptr<pqxx::connection> m_pDbConn;
}

int main()
{
    //boost program options parses CLI params, including connection string.
    std::shared_ptr<pqxx::connection> pDbConn = std::make_shared<pqxx::connection>(vm["db-connection-string"].as<std::string>());

    boost::asio::io_context ioc;    

    ControllerV2(ioc, std::move(pDbConn));

    ioc.run();

    return 0;
}

// controller.cpp
ControllerV2::ControllerV2(boost::asio::io_context & ioc, std::shared_ptr<pqxx::connection> pDbConn)
 : m_ioc(ioc)
 , m_pDbConn(std::move(pDbConn))
{
    // Do a bunch of stuff, including opening network connections, and registering callbacks via boost::asio for incoming network requests.
    // pDbConn gets passed around to other objects, such as various drivers for network connections for various protocols.
}

As you can see, I have some differences compared to the existing ozo examples.

  1. An object that has a variety of subobjects that all do database stuff, instead of a single main() function.
  2. Passing the database connection object into a non-template-type constructor (e.g., challange with ozo examples using "auto" for the connection info types.)
  3. Need for lifetime management of the database connection object. E.g. value semantics? Pointer semantics?

So here's my wishlist of examples:

  1. Less use of automatically deduced types (e.g. auto), because I don't want to convert all of my header file / cpp file pairs for various non-template classes / structs into template classes / structs.
  2. Information on the appropriate lifetime and handling semantics for ozo::connection_info<>, ozo::connection_provider<ozo::connection_info<>>, ozo::connection_pool<ozo::connection_info<>>. E.g., do I need to use std::shared_ptr? Or can I construct an ozo::connection_pool<ozo::connection_info<>> in main, and then pass it around by value? I would prefer not to pass it around by reference, so if I can't pass these by value, I would wrap them in a std::shared_ptr.
  3. A discussion of the costs and benefits of using an ozo::connection_pool versus using an ozo::connection directly. Why would I not want to use ozo::connection_pool? If there's no reason why I would not want to, why expose ozo::connection to the user at all?
  4. An example of storing the results of an ozo::request into a member variable of an object, and holding the lifetime of that object in the callback for ozo::request. -- I already know what I'm doing here. But there are probably lots of folks out there who wouldn't immediately see how to do it while reading the documentation.
  5. Some examples that use ozo::make_query, instead of the ozo::literals::_SQL syntax. E.g. for situations where the queries are read out of a configuration file.
  6. SQL Transactions? libpqxx automatically starts a transaction on the users behalf. It does not appear that this is the case in OZO. An example on how to use an SQL transaction, even if it just the BEGIN and END keywords inside an existing query, would help people understand the intended usage of OZO.
  7. Examples of how to receive notifications from the database, e.g. the LISTEN/NOTIFY functionality from PostgreSQL. To elaborate, in my application, I query the database for configuration information which is sent out on the network to other programs. I wish to listen to the database for changes to this configuration, and send re-configuration messages to the other applications over the network when that happens.
  8. Examples that use std::bind to call member functions of objects held by std::shared_ptr -- I already know how to do this. But there are probably lots of folks out there who wouldn't immediately see how to do it while reading the documentation.
  9. Fire-and-forget queries, where the query has no results, or no results that the application cares about. For example, in "internet of things" situations, often times you want various devices to communicate small amounts of information on a regular basis. It doesn't matter if the query succeeds, because it'll be re-executed with new data in a minute or two.
  10. Examples of managing the lifetime of parameters to queries. E.g. if I provide OZO with a string_view parameter to the query, do I need to ensure that string_view stays alive for the duration of the query?
  11. Examples of providing multiple parameters to queries with the ozo::literals::_SQL syntax. E.g. "partone"_SQL + int64_t(5) + "parttwo"_SQL;
  12. Is there any way to have ozo automatically manage the storage for the result? In libpqxx, the query returns a "row" object, which you can use to fetch data with raw string literals to map names to data. A facility in OZO to allow the library to automatically manage the storage for the results, and provide them as parameters to the callbacks, would be very helpful for end users who are either migrating from libpqxx, or who just don't care about this aspect of performance.
  13. An example of mapping a complex type, like nlohmann::json's json object type, to the result of a query. The existing how-to shows how to map data from C++ -> SQL, but not the other way around.

Refreshing connection in connection_pool

Currently, I cannot see any option to configure connection_pool to refresh connection. The functionality I'm referring to is explained e.g. here. Only the idle_timeout option is available, but I can imagine a scenario, where e.g. 1 out of 4 connections is used constantly for over 24h, which may result in some issues.
Is this refresh functionality somehow achievable in ozo? Or do you think it will be added in future?

macro name is a reserved identifier

/home/jonesmz/meshpp_frameworks/3rdparty/ozo/include/ozo/error.h:527: warning: macro name is a reserved identifier [-Wreserved-id-macro]
        #define __OZO_SQLSTATE_NAME(value) case value: return std::string(#value) + "(" + detail::ltob36(value) + ")";
                ^

Make a release

Hi!
Thank you for the such cool library! I'm interested in packaging the library into some dependecy managers. It will be much easier if you make a release on GitHub, so in a package recipe I will rely on some "stable" version instead of specific commit. E.g. it much easier to create a package for Conan with release.

Thank you!

connection pool error: get resource timeout

I keep seeing ozo::error_code's with the following value and message.

yamail::resource_pool::error::detail::category:1

get resource timeout

This is happening in the middle of my application's activities, where database activity is happening normally for several minutes already.

I'm using the default ozo::connection_pool_config settings.

I'm connecting to a database-as-a-service database in "the cloud", and have a pgBouncer load balance configured and managed by my service provider, so there shouldn't be any issues with connecting to the database, or a problem with limited number of connection slots available.

Could I get an explanation of possible causes for this error?

Does ozo throw exceptions?

Will, for example, ozo::execute throw an exception for reasons other than the CompletionToken provided to it throwing an exception?

ozo::request compilation error

I was trying a vary basic operation. But got compilation errors.

    ozo::connection_pool_config dbconfig;
    const auto oid_map = ozo::register_types<>();
    ozo::connection_info<decltype(oid_map)> conn_info("host=localhost dbname=wee user=postgres password=123456");
    ozo::connection_pool pool(conn_info, dbconfig);
    
    ozo::rows_of<std::int64_t> rows;
    using namespace ozo::literals;
    using namespace std::chrono_literals;
    const auto query = "SELECT "_SQL + std::int64_t(1);
    ozo::request(pool[io], query, ozo::into(rows), [&](ozo::error_code ec, auto conn){
//         for(auto& row: rows) {
//             std::cout << std::get<0>(row) << std::endl;
//         }
    });

Errors

/usr/include/boost/optional/optional.hpp:350:24:   required from ‘void boost::optional_detail::optional_base<T>::assign(boost::optional_detail::optional_base<T>::rval_reference_type) [with T = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>; boost::optional_detail::optional_base<T>::rval_reference_type = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>&&]’
/usr/include/boost/optional/optional.hpp:1066:21:   required from ‘typename boost::enable_if<boost::is_same<T, typename boost::decay<T_>::type>, boost::optional<T>&>::type boost::optional<T>::operator=(T_&&) [with T_ = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>; T = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>; typename boost::enable_if<boost::is_same<T, typename boost::decay<T_>::type>, boost::optional<T>&>::type = boost::optional<ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t> >&]’
/home/neel/Projects/wee/deps/ozo/contrib/resource_pool/include/yamail/resource_pool/handle.hpp:118:31:   required from ‘void yamail::resource_pool::handle<T>::reset(yamail::resource_pool::handle<T>::value_type&&) [with T = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>; yamail::resource_pool::handle<T>::value_type = ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>]’
/home/neel/Projects/wee/deps/ozo/include/ozo/impl/connection_pool.h:39:30:   required from ‘void ozo::detail::pooled_connection_wrapper<Source, Handler, TimeConstraint>::wrapper::operator()(ozo::error_code, Conn&&) [with Conn = std::shared_ptr<ozo::connection<const ozo::oid_map_t<>, ozo::none_t> >; Source = ozo::connection_info<const ozo::oid_map_t<> >; Handler = ozo::impl::async_request_op<ozo::impl::async_request_out_handler<std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > > >, ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >, ozo::none_t, main(int, char**)::<lambda(ozo::error_code, auto:54)> >; TimeConstraint = ozo::none_t; ozo::error_code = boost::system::error_code]’
/usr/include/c++/10.2.0/bits/invoke.h:60:36:   required from ‘constexpr _Res std::__invoke_impl(std::__invoke_other, _Fn&&, _Args&& ...) [with _Res = void; _Fn = ozo::detail::pooled_connection_wrapper<ozo::connection_info<const ozo::oid_map_t<> >, ozo::impl::async_request_op<ozo::impl::async_request_out_handler<std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > > >, ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >, ozo::none_t, main(int, char**)::<lambda(ozo::error_code, auto:54)> >, ozo::none_t>::wrapper; _Args = {boost::system::error_code, std::shared_ptr<ozo::connection<const ozo::oid_map_t<>, ozo::none_t> >}]’
/usr/include/c++/10.2.0/bits/invoke.h:95:40:   [ skipping 40 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/home/neel/Projects/wee/deps/ozo/include/ozo/request.h:114:28:   required from ‘constexpr void ozo::detail::initiate_async_request::operator()(Handler&&, P&&, TimeConstraint, Q&&, Out) const [with Handler = main(int, char**)::<lambda(ozo::error_code, auto:54)>; P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<const ozo::oid_map_t<> >, ozo::thread_safety<true> >&>; Q = const ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >&; TimeConstraint = ozo::none_t; Out = std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > >]’
/usr/include/boost/asio/async_result.hpp:151:49:   required from ‘static boost::asio::async_result<CompletionToken, Signature>::return_type boost::asio::async_result<CompletionToken, Signature>::initiate(Initiation&&, RawCompletionToken&&, Args&& ...) [with Initiation = ozo::detail::initiate_async_request; RawCompletionToken = main(int, char**)::<lambda(ozo::error_code, auto:54)>; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<const ozo::oid_map_t<>, ozo::none_t>, ozo::thread_safety<true> >&>, ozo::none_t&, const ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >&, std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > >}; CompletionToken = main(int, char**)::<lambda(ozo::error_code, auto:54)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); boost::asio::async_result<CompletionToken, Signature>::return_type = void]’
/usr/include/boost/asio/async_result.hpp:364:25:   required from ‘typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&&>)()...))>::type boost::asio::async_initiate(Initiation&&, CompletionToken&, Args&& ...) [with CompletionToken = main(int, char**)::<lambda(ozo::error_code, auto:54)>; Signature = void(boost::system::error_code, std::shared_ptr<ozo::pooled_connection<yamail::resource_pool::handle<ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t> >, boost::asio::io_context::executor_type> >); Initiation = ozo::detail::initiate_async_request; Args = {ozo::connection_provider<ozo::connection_pool<ozo::connection_info<const ozo::oid_map_t<>, ozo::none_t>, ozo::thread_safety<true> >&>, ozo::none_t&, const ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >&, std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > >}; typename std::enable_if<boost::asio::detail::async_result_has_initiate_memfn<CompletionToken, Signature>::value, decltype (boost::asio::async_result<typename std::decay<_Tp>::type, Signature>::initiate(declval<Initiation&&>(), declval<CompletionToken&&>(), (declval<Args&&>)()...))>::type = void]’
/home/neel/Projects/wee/deps/ozo/include/ozo/request.h:94:69:   required from ‘decltype(auto) ozo::request_op<Initiator>::operator()(P&&, Q&&, TimeConstraint, Out, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<const ozo::oid_map_t<> >, ozo::thread_safety<true> >&>; Q = const ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >&; TimeConstraint = ozo::none_t; Out = std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > >; CompletionToken = main(int, char**)::<lambda(ozo::error_code, auto:54)>; Initiator = ozo::detail::initiate_async_request]’
/home/neel/Projects/wee/deps/ozo/include/ozo/request.h:100:23:   required from ‘decltype(auto) ozo::request_op<Initiator>::operator()(P&&, Q&&, Out, CompletionToken&&) const [with P = ozo::connection_provider<ozo::connection_pool<ozo::connection_info<const ozo::oid_map_t<> >, ozo::thread_safety<true> >&>; Q = const ozo::query_builder<boost::hana::tuple<ozo::query_element<boost::hana::string<'S', 'E', 'L', 'E', 'C', 'T', ' '>, ozo::query_text_tag>, ozo::query_element<long int, ozo::query_param_tag> > >&; Out = std::back_insert_iterator<std::vector<std::tuple<long int>, std::allocator<std::tuple<long int> > > >; CompletionToken = main(int, char**)::<lambda(ozo::error_code, auto:54)>; Initiator = ozo::detail::initiate_async_request]’
/home/neel/Projects/wee/main.cpp:123:6:   required from here
/usr/include/boost/optional/optional.hpp:751:64: error: use of deleted function ‘ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>& ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>::operator=(ozo::connection_rep<const ozo::oid_map_t<>, ozo::none_t>&&)’
  751 |     void assign_value ( rval_reference_type val ) { get_impl() = static_cast<rval_reference_type>(val); }

ozo can't find resource_pool

(using cmake version 3.15.4)

Trying to use ozo on master branch and simply adding an add_directory("vendor/ozo") to my projects CMakeLists.txt.

This results in the below error:

[cmake] CMake Warning at vendor/ozo/CMakeLists.txt:14 (find_package):
[cmake]   By not providing "Findresource_pool.cmake" in CMAKE_MODULE_PATH this
[cmake]   project has asked CMake to find a package configuration file provided by
[cmake]   "resource_pool", but CMake did not find one.
[cmake] 
[cmake]   Could not find a package configuration file provided by "resource_pool"
[cmake]   (requested version 0.1.0) with any of the following names:
[cmake] 
[cmake]     resource_poolConfig.cmake
[cmake]     resource_pool-config.cmake
[cmake] 
[cmake]   Add the installation prefix of "resource_pool" to CMAKE_PREFIX_PATH or set
[cmake]   "resource_pool_DIR" to a directory containing one of the above files.  If
[cmake]   "resource_pool" provides a separate development package or SDK, be sure it
[cmake]   has been installed.

Only solution I've found for this is adding a QUIET to the find_package, alternatively commenting out the line to make it pick up the vendored resource_pool:

find_package(resource_pool 0.1.0 QUIET)
if (NOT resource_pool_FOUND)
    add_subdirectory(contrib)
endif()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.