implemented lazy loading for object_ptr and belongs_to
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#include "matador/sql/internal/identifier_reader.hpp"
|
||||
|
||||
namespace matador::sql::internal {
|
||||
identifier_reader::identifier_reader(query_result_reader &reader)
|
||||
: reader_(reader) {}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "matador/sql/internal/identifier_statement_binder.hpp"
|
||||
|
||||
#include "matador/sql/statement.hpp"
|
||||
|
||||
namespace matador::sql {
|
||||
identifier_statement_binder::identifier_statement_binder(statement &stmt, const size_t index)
|
||||
: stmt_(stmt)
|
||||
, index_(index) {}
|
||||
|
||||
void identifier_statement_binder::bind(const utils::identifier &id) {
|
||||
id.serialize(*this);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(int8_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(int16_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(int32_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(int64_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(uint8_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(uint16_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(uint32_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(uint64_t &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(const char *value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(std::string &value, const utils::field_attributes &) {
|
||||
stmt_.bind(index_, value);
|
||||
}
|
||||
|
||||
void identifier_statement_binder::serialize(utils::null_type_t &/*value*/, const utils::field_attributes &) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "matador/sql/internal/resolver_producer.hpp"
|
||||
|
||||
namespace matador::sql {
|
||||
const std::type_index & resolver_producer::type() const {
|
||||
return type_;
|
||||
}
|
||||
|
||||
resolver_producer::resolver_producer(const std::type_index &type)
|
||||
: type_(type) {}
|
||||
}
|
||||
Reference in New Issue
Block a user