Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions tests/postgresql/recipes/enum/db_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
// clang-format off
// generated by ./scripts/sqlpp23-ddl2cpp --path-to-ddl tests/postgresql/recipes/enum/db_model.sql --path-to-header tests/postgresql/recipes/enum/db_model.h --namespace test --assume-auto-id --generate-table-creation-helper

#include <optional>

#include <sqlpp23/core/basic/table.h>
#include <sqlpp23/core/basic/table_columns.h>
#include <sqlpp23/core/name/create_name_tag.h>
#include <sqlpp23/core/type_traits.h>
// The following auto-generated includes have been commented out manually to work around GCC bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99000
//
// #include <optional>
//
// #include <sqlpp23/core/basic/table.h>
// #include <sqlpp23/core/basic/table_columns.h>
// #include <sqlpp23/core/name/create_name_tag.h>
// #include <sqlpp23/core/type_traits.h>

namespace test {
template<typename Db>
Expand Down
6 changes: 3 additions & 3 deletions tests/postgresql/recipes/enum/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@
//
// For details on the actual pattern see /docs/recipes/enum.md

#include <ranges>
#include <utility>

#include <sqlpp23/tests/postgresql/all.h>

// The enum definitions must be included before the database model
#include <enum_animal.h>
#include <enum_shape.h>
#include <db_model.h>

#include <ranges>

namespace sql = ::sqlpp::postgresql;

void test_enum_rw(sql::connection& db) {
Expand All @@ -49,7 +50,6 @@ void test_enum_rw(sql::connection& db) {
{animal::cat, shape::circle},
{animal::dog, shape::square},
{static_cast<animal>(10), shape::circle}};
std::ranges::sort(val_write);
// Write the enums vector to the database
delete_from(te);
for (const auto v : val_write) {
Expand Down