column, placeholder and column_value generator progress

This commit is contained in:
Sascha Kühl
2025-11-10 16:12:53 +01:00
parent 4b51ad21da
commit b3bff2dd1b
15 changed files with 267 additions and 83 deletions
+1 -18
View File
@@ -22,8 +22,7 @@ private:
column_generator(std::vector<column> &column_infos,
const object::repository &ts,
const std::string &table_name,
bool force_lazy,
bool has_many_to_many = false);
bool force_lazy);
public:
template < class Type >
@@ -56,18 +55,12 @@ public:
template < class V >
void on_primary_key(const char *id, V &, const utils::primary_key_attribute& /*attr*/ = utils::default_pk_attributes) {
if (has_many_to_many_) {
return;
}
push(id);
}
void on_revision(const char *id, uint64_t &/*rev*/);
template<typename Type>
void on_attribute(const char *id, Type &, const utils::field_attributes &/*attr*/ = utils::null_attributes) {
if (has_many_to_many_) {
return;
}
push(id);
}
@@ -82,9 +75,6 @@ public:
template<class ContainerType>
void on_has_many(const char * /*id*/, ContainerType &, const char *, const utils::foreign_attributes &attr) {
if (has_many_to_many_) {
return;
}
if (attr.fetch() == utils::fetch_type::LAZY || force_lazy_) {
return;
}
@@ -105,9 +95,6 @@ public:
template<class ContainerType>
void on_has_many_to_many(const char * /*id*/, ContainerType & /*cont*/, const char *join_column, const char *inverse_join_column, const utils::foreign_attributes &/*attr*/) {
if (!has_many_to_many_) {
return;
}
push(join_column);
push(inverse_join_column);
}
@@ -118,9 +105,6 @@ public:
private:
template<class Pointer>
void on_foreign_key(const char *id, Pointer &, const utils::foreign_attributes &attr) {
if (has_many_to_many_) {
return;
}
if (attr.fetch() == utils::fetch_type::LAZY || force_lazy_) {
push(id);
} else {
@@ -148,7 +132,6 @@ private:
const object::repository &table_schema_;
int column_index{0};
bool force_lazy_{false};
bool has_many_to_many_{false};
};
}