removed make_relation_node method from repository_node
This commit is contained in:
@@ -92,45 +92,9 @@ bool attribute::is_null() const {
|
||||
return type_ == utils::basic_type::type_null;
|
||||
}
|
||||
|
||||
// attribute make_column(const std::string &name, utils::basic_type type, utils::field_attributes attr,
|
||||
// null_option_type null_opt) {
|
||||
// return {name, type, attr, null_opt};
|
||||
// }
|
||||
//
|
||||
// template<>
|
||||
// attribute make_column<std::string>(const std::string &name, utils::field_attributes attr,
|
||||
// null_option_type null_opt) {
|
||||
// return make_column(name, utils::data_type_traits<std::string>::type(attr.size()), attr, null_opt);
|
||||
// }
|
||||
//
|
||||
// template<>
|
||||
// attribute make_pk_column<std::string>(const std::string &name, size_t size) {
|
||||
// return make_column<std::string>(name, {size, utils::constraints::PrimaryKey});
|
||||
// }
|
||||
//
|
||||
// template<>
|
||||
// attribute make_fk_column<std::string>(const std::string &name, size_t size, const std::shared_ptr<attribute> &ref_column) {
|
||||
// return {
|
||||
// name, utils::data_type_traits<std::string>::type(size), 0, ref_column,
|
||||
// {size, utils::constraints::ForeignKey}, null_option_type::NOT_NULL
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// template<>
|
||||
// attribute make_fk_column<std::string>( const std::string& name, const std::string& ref_table_name, const std::string& ref_column_name ) {
|
||||
// return {
|
||||
// name, utils::basic_type::type_varchar, 0,
|
||||
// std::make_shared<attribute>(ref_column_name, utils::basic_type::type_varchar, ref_table_name, attribute_options{utils::constraints::ForeignKey}),
|
||||
// { 0, utils::constraints::ForeignKey }, null_option_type::NOT_NULL
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// template<>
|
||||
// attribute make_fk_column<std::string>(const std::string &name, size_t size, const std::string &ref_table_name, const std::string &ref_column_name) {
|
||||
// const auto ref_column = std::make_shared<attribute>(ref_column_name, utils::basic_type::type_varchar, ref_table_name, attribute_options{utils::constraints::ForeignKey});
|
||||
// return {
|
||||
// name, utils::data_type_traits<std::string>::type(size), 0, ref_column,
|
||||
// {size, utils::constraints::ForeignKey}, null_option_type::NOT_NULL
|
||||
// };
|
||||
// }
|
||||
std::ostream & operator<<(std::ostream &os, const attribute &attr) {
|
||||
os << attr.name_;
|
||||
return os;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user