fixed nextval and update tests

This commit is contained in:
2026-03-07 16:34:48 +01:00
parent 2aff0cabbb
commit 801fbdd187
3 changed files with 3 additions and 5 deletions
@@ -12,6 +12,7 @@ query_select_intermediate::query_select_intermediate(const std::vector<table_col
}
fetchable_query query_select_intermediate::nextval(const std::string& sequence_name) {
context_->parts.pop_back();
context_->parts.push_back(std::make_unique<internal::query_select_nextval_part>(sequence_name));
return {context_};
}
+1 -1
View File
@@ -100,7 +100,7 @@ void query_builder::visit(internal::query_select_part &part) {
}
void query_builder::visit(internal::query_select_nextval_part& part) {
query_.sql += dialect_->nextval() + "('" + part.sequence_name() + "')";
query_.sql += dialect_->select() + " " + dialect_->nextval() + "('" + part.sequence_name() + "')";
prepare_prototype(query_.prototype, part.sequence_name());
}