mirror of
https://github.com/SOCI/soci.git
synced 2026-05-04 18:29:38 -05:00
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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user