ensure proper table creation in session::create_schema including foreign key constraints
This commit is contained in:
@@ -54,13 +54,13 @@ private:
|
||||
|
||||
class attribute_definition_generator final {
|
||||
private:
|
||||
attribute_definition_generator(std::vector<attribute_definition> &columns, schema &repo);
|
||||
attribute_definition_generator(std::vector<attribute_definition> &columns, const schema &repo);
|
||||
|
||||
public:
|
||||
~attribute_definition_generator() = default;
|
||||
|
||||
template < class Type >
|
||||
static std::vector<attribute_definition> generate(schema &repo)
|
||||
static std::vector<attribute_definition> generate(const schema &repo)
|
||||
{
|
||||
std::vector<attribute_definition> columns;
|
||||
attribute_definition_generator gen(columns, repo);
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
}
|
||||
|
||||
template < class Type >
|
||||
static std::vector<attribute_definition> generate(const Type& obj, schema &repo) {
|
||||
static std::vector<attribute_definition> generate(const Type& obj, const schema &repo) {
|
||||
std::vector<attribute_definition> columns;
|
||||
attribute_definition_generator gen(columns, repo);
|
||||
access::process(gen, obj);
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
private:
|
||||
size_t index_ = 0;
|
||||
std::vector<attribute_definition> &columns_;
|
||||
schema &repo_;
|
||||
const schema &repo_;
|
||||
|
||||
fk_attribute_generator fk_column_generator_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user