updated README.md

This commit is contained in:
Sascha Kuehl 2023-12-17 22:12:49 +01:00
parent 320d06bb20
commit 94b1c356a5
1 changed files with 5 additions and 5 deletions

View File

@ -53,10 +53,10 @@ session s(pool);
// create all tables
s.create().table<airplane>().execute();
std::vector<entity<airplane>> planes {
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})
std::vector<airplane> planes {
{1, "Airbus", "A380", Color::Green, {1, 2, 3}},
{2, "Boeing", "707", Color::White, {4, 5, 6}},
{3, "Boeing", "747", Color::Blue, {0, 0, 0}}
};
auto stmt = s.insert()
@ -66,7 +66,7 @@ auto stmt = s.insert()
// insert
for (const auto &plane: planes) {
auto res = stmt.bind(*plane).execute();
auto res = stmt.bind(plane).execute();
stmt.reset();
}