session insert builder progress
This commit is contained in:
@@ -7,10 +7,12 @@ namespace matador::sql {
|
||||
column_generator::column_generator(std::vector<column> &column_infos,
|
||||
const object::schema &scm,
|
||||
const std::string &table_name,
|
||||
bool force_lazy)
|
||||
const bool force_lazy,
|
||||
const bool has_many_to_many)
|
||||
: column_infos_(column_infos)
|
||||
, table_schema_(scm)
|
||||
, force_lazy_(force_lazy)
|
||||
, has_many_to_many_(has_many_to_many)
|
||||
{
|
||||
table_name_stack_.push(table_name);
|
||||
seen_tables.insert(table_name);
|
||||
@@ -18,11 +20,17 @@ column_generator::column_generator(std::vector<column> &column_infos,
|
||||
|
||||
void column_generator::on_primary_key(const char *id, std::string &, size_t)
|
||||
{
|
||||
if (has_many_to_many_) {
|
||||
return;
|
||||
}
|
||||
push(id);
|
||||
}
|
||||
|
||||
void column_generator::on_revision(const char *id, unsigned long long int &)
|
||||
{
|
||||
if (has_many_to_many_) {
|
||||
return;
|
||||
}
|
||||
push(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user