implemented lazy loading for object_ptr and belongs_to
This commit is contained in:
@@ -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 &) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user