attribute_definition and object_definition progress

This commit is contained in:
Sascha Kühl
2025-11-17 15:58:09 +01:00
parent 9ffcee1317
commit 7242dc2612
17 changed files with 161 additions and 205 deletions
+1 -11
View File
@@ -5,16 +5,6 @@
namespace matador::sql::detail {
field_type determine_field_type(const utils::constraints c) {
if (is_constraint_set(c, utils::constraints::FOREIGN_KEY)) {
return field_type::ForeignKey;
}
if (is_constraint_set(c, utils::constraints::PRIMARY_KEY)) {
return field_type::PrimaryKey;
}
return field_type::Attribute;
}
template<>
record *create_prototype<record>(const std::vector<object::attribute_definition> &prototype) {
auto result = std::make_unique<record>();
@@ -22,7 +12,7 @@ record *create_prototype<record>(const std::vector<object::attribute_definition>
result->append({
col.name(),
col.type(),
determine_field_type(col.attributes().options()),
col.attributes().options(),
col.attributes().size(),
col.index()
});