From a98301049220491e7017af0fcc4e531144e984a4 Mon Sep 17 00:00:00 2001 From: Benjamin Oldenburg Date: Mon, 1 Apr 2024 06:13:45 +0700 Subject: [PATCH] removed default labels and added dt_wstring back to deprecated data_type --- include/soci/soci-backend.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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