Remove data_type argument from describe_column() backend function

This is unnecessary as it can be recovered from db_type: even if this is
not lossless, we don't really care about it if all we need is data_type,
so simplify the API and the implementation by only having one "type"
parameter instead of two.

No real changes.
This commit is contained in:
Vadim Zeitlin
2024-01-03 00:36:54 +01:00
parent 75c8fd87c1
commit fdfcc12e8d
18 changed files with 85 additions and 105 deletions
+3 -4
View File
@@ -702,16 +702,15 @@ void statement_impl::describe()
int const numcols = backEnd_->prepare_for_describe();
for (int i = 1; i <= numcols; ++i)
{
data_type dtype;
db_type dbtype;
std::string columnName;
backEnd_->describe_column(i, dtype, dbtype, columnName);
backEnd_->describe_column(i, dbtype, columnName);
column_properties props;
props.set_name(columnName);
props.set_data_type(dtype);
props.set_db_type(dbtype);
props.set_data_type(details::to_data_type(dbtype));
switch (dbtype)
{
@@ -752,7 +751,7 @@ void statement_impl::describe()
break;
default:
std::ostringstream msg;
msg << "db column type " << dtype
msg << "db column type " << dbtype
<<" not supported for dynamic selects"<<std::endl;
throw soci_error(msg.str());
}