fixed nextval and update tests
This commit is contained in:
@@ -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_};
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user