@@ -101,8 +101,8 @@ In the presented example we used rename of the columns, for more details see how
101101you can query the email and get access to the user record as well
102102
103103``` cpp
104- auto dm = Light::DataMapper{} ;
105- auto email = dm. QuerySingle<Email>(some_email_id).value_or(Email{});
104+ auto dm = Light::DataMapper::Create() ;
105+ auto email = dm-> QuerySingle<Email>(some_email_id).value_or(Email{});
106106auto user_name = email.user->name; // lazily loads the user record
107107```
108108
@@ -171,8 +171,8 @@ struct CustomBindingC
171171
172172Create a query to join those tables to get in a single query
173173``` cpp
174- auto dm = DataMapper {} ;
175- auto query = dm. FromTable(RecordTableName<CustomBindingA>)
174+ auto dm = Light:: DataMapper::Create() ;
175+ auto query = dm-> FromTable (RecordTableName<CustomBindingA >)
176176 .Select()
177177 .Fields<CustomBindingA, CustomBindingB>()
178178 .Field(QualifiedColumnName<"C.id">)
@@ -199,7 +199,7 @@ struct PartOfC
199199 SqlAnsiString<20> comment {};
200200};
201201
202- auto const records = dm.QueryToTuple <CustomBindingA, CustomBindingB, PartOfC>(query);
202+ auto const records = dm->Query <CustomBindingA, CustomBindingB, PartOfC>(query);
203203for (auto const & [a, b, c]: records)
204204{
205205 // ...
@@ -274,4 +274,4 @@ cmake --build build && ./build/src/examples/example
274274
275275``` sh
276276docker buildx build --progress=plain -f .github/DockerReflection --load .
277- ```
277+ ```
0 commit comments