identity generator progress

This commit is contained in:
Sascha Kühl
2026-02-11 16:01:44 +01:00
parent 881e93e0f6
commit 4c63322024
20 changed files with 68 additions and 69 deletions
+4 -4
View File
@@ -58,15 +58,15 @@ int record_printer::width(const sql::field &f) {
// If it's a varchar/string and has a defined size, use it if it's reasonable,
// otherwise fall back to type defaults.
if ((f.is_varchar() || f.is_string()) && f.size() > 0 && f.size() < 100) {
return std::max(f.name().length(), f.size());
return static_cast<int>(std::max(f.name().length(), f.size()));
}
// Find the default width for type
// Note: field class doesn't expose basic_type directly but we can use value().type()
// if we had access. For now we use name length as minimum.
// Note: field class doesn't expose basic_type directly, but we can use value().type()
// if we had access. For now we use name length as a minimum.
constexpr size_t w = 15;
// In a real implementation we would probe the field's underlying type.
return std::max(f.name().length(), w);
return static_cast<int>(std::max(f.name().length(), w));
}
}