mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-16 04:47:18 +08:00
Added storage type to parameter_value_base struct
This allows to store bool as signed char, the latter being the usual data type in connector libraries afaict
This commit is contained in:
parent
21d633bdf4
commit
fae1f08d93
@ -35,9 +35,9 @@
|
||||
namespace sqlpp
|
||||
{
|
||||
template <>
|
||||
struct parameter_value_t<boolean> : public base_parameter_value<boolean>
|
||||
struct parameter_value_t<boolean> : public base_parameter_value<boolean, signed char>
|
||||
{
|
||||
using base = base_parameter_value<boolean>;
|
||||
using base = base_parameter_value<boolean, signed char>;
|
||||
using base::base;
|
||||
using base::operator=;
|
||||
|
||||
|
@ -32,11 +32,12 @@
|
||||
|
||||
namespace sqlpp
|
||||
{
|
||||
template <typename DataType>
|
||||
template <typename DataType, typename StorageType = typename DataType::_cpp_value_type>
|
||||
struct base_parameter_value
|
||||
{
|
||||
using _value_type = DataType;
|
||||
using _cpp_value_type = typename _value_type::_cpp_value_type;
|
||||
using _cpp_storage_type = StorageType;
|
||||
|
||||
base_parameter_value() : _value{}, _is_null{true}
|
||||
{
|
||||
@ -90,7 +91,7 @@ namespace sqlpp
|
||||
}
|
||||
|
||||
protected:
|
||||
_cpp_value_type _value;
|
||||
_cpp_storage_type _value;
|
||||
bool _is_null;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user