identity generator progress
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user