session update progress
This commit is contained in:
@@ -61,6 +61,8 @@ private:
|
||||
|
||||
class object_parameter_binder {
|
||||
public:
|
||||
explicit object_parameter_binder(bool include_primary_key = true);
|
||||
|
||||
template<class Type>
|
||||
void bind(Type &obj, utils::attribute_writer &binder) {
|
||||
binder_ = &binder;
|
||||
@@ -69,10 +71,13 @@ public:
|
||||
}
|
||||
|
||||
void reset(size_t start_index);
|
||||
[[nodiscard]] size_t current_index() const;
|
||||
|
||||
template < class Type >
|
||||
void on_primary_key(const char * /*id*/, Type &val, const utils::primary_key_attribute& attr = utils::default_pk_attributes) {
|
||||
utils::data_type_traits<Type>::bind_value(*binder_, index_++, val, attr.size());
|
||||
if (include_primary_key_) {
|
||||
utils::data_type_traits<Type>::bind_value(*binder_, index_++, val, attr.size());
|
||||
}
|
||||
}
|
||||
void on_revision(const char *id, uint64_t &/*rev*/);
|
||||
|
||||
@@ -109,6 +114,7 @@ private:
|
||||
utils::attribute_writer *binder_{};
|
||||
size_t index_{0};
|
||||
detail::fk_binder fk_binder_;
|
||||
bool include_primary_key_{true};
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
Reference in New Issue
Block a user