updated README.md
This commit is contained in:
parent
320d06bb20
commit
94b1c356a5
10
README.md
10
README.md
|
|
@ -53,10 +53,10 @@ session s(pool);
|
||||||
// create all tables
|
// create all tables
|
||||||
s.create().table<airplane>().execute();
|
s.create().table<airplane>().execute();
|
||||||
|
|
||||||
std::vector<entity<airplane>> planes {
|
std::vector<airplane> planes {
|
||||||
make_entity<airplane>(1, "Airbus", "A380", Color::Green, {1, 2, 3}),
|
{1, "Airbus", "A380", Color::Green, {1, 2, 3}},
|
||||||
make_entity<airplane>(2, "Boeing", "707", Color::White, {4, 5, 6}),
|
{2, "Boeing", "707", Color::White, {4, 5, 6}},
|
||||||
make_entity<airplane>(3, "Boeing", "747", Color::Blue, {0, 0, 0})
|
{3, "Boeing", "747", Color::Blue, {0, 0, 0}}
|
||||||
};
|
};
|
||||||
|
|
||||||
auto stmt = s.insert()
|
auto stmt = s.insert()
|
||||||
|
|
@ -66,7 +66,7 @@ auto stmt = s.insert()
|
||||||
|
|
||||||
// insert
|
// insert
|
||||||
for (const auto &plane: planes) {
|
for (const auto &plane: planes) {
|
||||||
auto res = stmt.bind(*plane).execute();
|
auto res = stmt.bind(plane).execute();
|
||||||
stmt.reset();
|
stmt.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue