Skip to content

Commit

Permalink
fix bug with auto_key id
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacyking committed Nov 14, 2023
1 parent 57990f1 commit ef682b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ inline std::string generate_auto_insert_sql(
values += ")";
}
}
fields.pop_back();
values.pop_back();
if (fields.back() == ',') {
fields.back() = ')';
}
if (values.back() == ',') {
values.back() = ')';
}
append(sql, fields, values);
return sql;
}
Expand Down

0 comments on commit ef682b5

Please sign in to comment.