diff --git a/include/soci/soci-backend.h b/include/soci/soci-backend.h index 007970cbe..df27dd26f 100644 --- a/include/soci/soci-backend.h +++ b/include/soci/soci-backend.h @@ -45,7 +45,7 @@ enum db_type enum data_type { dt_string, dt_date, dt_double, dt_integer, dt_long_long, dt_unsigned_long_long, - dt_blob, dt_xml + dt_blob, dt_xml, dt_wstring }; // the enum type for indicator variables @@ -108,8 +108,7 @@ inline db_type to_db_type(data_type dt) case dt_unsigned_long_long: return db_uint64; case dt_blob: return db_blob; case dt_xml: return db_xml; - default: - throw soci_error("unsupported data_type"); + case dt_wstring: return db_wstring; } // unreachable @@ -264,6 +263,7 @@ class statement_backend switch (dbt) { case db_string: return dt_string; + case db_wstring: return dt_wstring; case db_date: return dt_date; case db_double: return dt_double; case db_int8: @@ -276,8 +276,6 @@ class statement_backend case db_uint64: return dt_unsigned_long_long; case db_blob: return dt_blob; case db_xml: return dt_xml; - default: - throw soci_error("unable to convert value to data_type"); } // unreachable