implemented lazy loading for object_ptr and belongs_to
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#ifndef MATADOR_IDENTIFIER_TO_VALUE_CONVERTER_HPP
|
||||
#define MATADOR_IDENTIFIER_TO_VALUE_CONVERTER_HPP
|
||||
|
||||
#include "matador/utils/identifier.hpp"
|
||||
#include "matador/utils/value.hpp"
|
||||
|
||||
namespace matador::utils {
|
||||
class identifier_to_value_converter final : public identifier_serializer {
|
||||
public:
|
||||
[[nodiscard]] value convert(const identifier &id);
|
||||
|
||||
void serialize(int8_t &, const field_attributes &) override;
|
||||
void serialize(int16_t &, const field_attributes &) override;
|
||||
void serialize(int32_t &, const field_attributes &) override;
|
||||
void serialize(int64_t &, const field_attributes &) override;
|
||||
void serialize(uint8_t &, const field_attributes &) override;
|
||||
void serialize(uint16_t &, const field_attributes &) override;
|
||||
void serialize(uint32_t &, const field_attributes &) override;
|
||||
void serialize(uint64_t &, const field_attributes &) override;
|
||||
void serialize(const char *, const field_attributes &) override;
|
||||
void serialize(std::string &, const field_attributes &) override;
|
||||
void serialize(null_type_t &, const field_attributes &) override;
|
||||
|
||||
private:
|
||||
value value_;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //MATADOR_IDENTIFIER_TO_VALUE_CONVERTER_HPP
|
||||
Reference in New Issue
Block a user