Browse Source

* changed type properties for timestamp

master
bergmann 5 years ago
parent
commit
852cf3228f
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      include/cpphibernate/driver/mariadb/helper/type_properties.h

+ 5
- 5
include/cpphibernate/driver/mariadb/helper/type_properties.h View File

@@ -330,7 +330,7 @@ beg_namespace_cpphibernate_driver_mariadb
struct type_properties<timestamp, void>
{
static constexpr decltype(auto) type()
{ return "DATETIME"; }
{ return "BIGINT"; }

static inline timestamp convert_to(const value_t& value)
{ return timestamp(utl::from_string<uint64_t>(*value)); }
@@ -339,16 +339,16 @@ beg_namespace_cpphibernate_driver_mariadb
{ return utl::to_string(static_cast<uint64_t>(value)); }

static constexpr const char* convert_to_open()
{ return "FROM_UNIXTIME("; }
{ return nullptr; }

static constexpr const char* convert_to_close()
{ return ")"; }
{ return nullptr; }

static constexpr const char* convert_from_open()
{ return "UNIX_TIMESTAMP("; }
{ return nullptr; }

static constexpr const char* convert_from_close()
{ return ")"; }
{ return nullptr; }
};

template<>


Loading…
Cancel
Save