changed the way how the table name is set in a Model - added prepare_table() method

removed from Model:
virtual void table_name(PT::TextStream & stream);

added to Model:
virtual void prepare_table();
virtual void table(const wchar_t * table_name);
virtual void table(const wchar_t * schema_name, const wchar_t * table_name);
This commit is contained in:
2021-03-11 12:22:37 +01:00
parent fcf1d28b18
commit f7490594ad
18 changed files with 193 additions and 182 deletions

View File

@@ -32,6 +32,9 @@
*
*/
#ifndef headerfile_morm_samples_sample01
#define headerfile_morm_samples_sample01
#include <ctime>
#include "basesample.h"
#include "person.h"
@@ -62,7 +65,7 @@ void make()
person.set_connector(model_connector);
load_defaults(person);
//std::wstring sss = L"cosik wstawiony dynamicznie";
//std::wstring sss = L"some text put dynamically";
//person.set_field_value_generic(L"email", L"email", sss);
@@ -75,7 +78,7 @@ void make()
morm::Finder<Person> finder(model_connector);
Person p = finder.select().where().eq(L"id", 207).get();
Person p = finder.select().where().eq(L"id", 210).get();
p.to_text(str, true, true);
@@ -223,3 +226,5 @@ private:
}
}
#endif