#ifndef QUERY_OBJECT_BINDER_HPP #define QUERY_OBJECT_BINDER_HPP #include "matador/utils/cascade_type.hpp" #include "matador/utils/field_attributes.hpp" #include namespace matador::sql { class parameter_binder; class object_binder { public: explicit object_binder(parameter_binder &binder); void reset(); template < class V > void on_primary_key(const char *id, V &val, typename std::enable_if::value && !std::is_same::value>::type* = 0) { binder_.bind(index_++, val); } void on_primary_key(const char *id, std::string &, size_t); void on_revision(const char *id, unsigned long long &/*rev*/); template void on_attribute(const char *id, Type &val, const utils::field_attributes &/*attr*/ = utils::null_attributes) { binder_.bind(index_++, val); } template class Pointer> void on_belongs_to(const char *id, Pointer &x, utils::cascade_type) { // binder_.bind(index_++, val); } template class Pointer> void on_has_one(const char *id, Pointer &x, utils::cascade_type) { // binder_.bind(index_++, val); } template void on_has_many(const char *, ContainerType &, const char *, const char *, utils::cascade_type) {} template void on_has_many(const char *, ContainerType &, utils::cascade_type) {} private: parameter_binder &binder_; size_t index_{0}; }; } #endif //QUERY_OBJECT_BINDER_HPP