column, placeholder and column_value generator progress
This commit is contained in:
@@ -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};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user