diff --git a/web/cpp/SQLiteQueryExecutorBindings.cpp b/web/cpp/SQLiteQueryExecutorBindings.cpp --- a/web/cpp/SQLiteQueryExecutorBindings.cpp +++ b/web/cpp/SQLiteQueryExecutorBindings.cpp @@ -4,6 +4,7 @@ #include "entities/OutboundP2PMessage.h" #include +#include #include namespace comm { @@ -345,5 +346,55 @@ } }; +template struct TypeID> { + static constexpr TYPEID get() { + return LightTypeID::get(); + } +}; + +template struct TypeID> { + static constexpr TYPEID get() { + return LightTypeID::get(); + } +}; + +template struct TypeID &> { + static constexpr TYPEID get() { + return LightTypeID::get(); + } +}; + +template struct TypeID &&> { + static constexpr TYPEID get() { + return LightTypeID::get(); + } +}; + +template struct TypeID &> { + static constexpr TYPEID get() { + return LightTypeID::get(); + } +}; + +template struct BindingType> { + using ValBinding = BindingType; + using WireType = ValBinding::WireType; + + static WireType toWireType(std::optional const &opt) { + if (!opt.has_value()) { + return ValBinding::toWireType(val::null()); + } + return ValBinding::toWireType(val(opt.value())); + } + + static std::optional fromWireType(WireType value) { + val convertedVal = ValBinding::fromWireType(value); + if (convertedVal.isNull() || convertedVal.isUndefined()) { + return std::nullopt; + } + return std::make_optional(convertedVal.as()); + } +}; + } // namespace internal } // namespace emscripten