updated README.md

This commit is contained in:
Sascha Kuehl 2023-12-11 20:18:58 +01:00
parent 56c65203fc
commit 2893f749b6
1 changed files with 4 additions and 4 deletions

View File

@ -54,9 +54,9 @@ session s(pool);
s.create().table<airplane>().execute();
std::vector<entity<airplane>> planes {
make_entity<airplane>(1, "Airbus", "A380"),
make_entity<airplane>(2, "Boeing", "707"),
make_entity<airplane>(3, "Boeing", "747")
make_entity<airplane>(1, "Airbus", "A380", Color::Green, {1, 2, 3}),
make_entity<airplane>(2, "Boeing", "707", Color::White, {4, 5, 6}),
make_entity<airplane>(3, "Boeing", "747", Color::Blue, {0, 0, 0})
};
auto stmt = s.insert()
@ -72,7 +72,7 @@ for (const auto &plane: planes) {
s.update("airplane")
.set({"model", "737"})
.where("id"_col == 2)
.where("id"_col == 2 && "color"_col == Color::White)
.execute();
auto result = s.select<airplane>()