added timestamp code, support columns for group by and order by and tested load has-many eager code
This commit is contained in:
@@ -2,16 +2,12 @@
|
||||
#define OOS_ACCESS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
namespace matador {
|
||||
|
||||
enum class cascade_type;
|
||||
|
||||
template < class Type, template < class ... > class ContainerType >
|
||||
class container;
|
||||
|
||||
namespace utils {
|
||||
class field_attributes;
|
||||
class foreign_attributes;
|
||||
|
||||
@@ -194,6 +194,7 @@ public:
|
||||
[[nodiscard]] bool is_varchar() const;
|
||||
[[nodiscard]] bool is_date() const;
|
||||
[[nodiscard]] bool is_time() const;
|
||||
[[nodiscard]] bool is_timestamp() const;
|
||||
[[nodiscard]] bool is_blob() const;
|
||||
[[nodiscard]] bool is_null() const;
|
||||
|
||||
|
||||
@@ -18,15 +18,19 @@ size_t determine_size(const blob_type_t &val);
|
||||
|
||||
}
|
||||
|
||||
class value
|
||||
{
|
||||
class value {
|
||||
public:
|
||||
value() = default;
|
||||
template<typename Type>
|
||||
template<typename Type, std::enable_if_t<!std::is_enum_v<Type>>* = nullptr>
|
||||
explicit value(Type value, size_t size = 0)
|
||||
: value_(value)
|
||||
, size_(size)
|
||||
, type_(data_type_traits<Type>::type(size)) {}
|
||||
template<typename Type, std::enable_if_t<std::is_enum_v<Type>>* = nullptr>
|
||||
explicit value(Type value, size_t size = 0)
|
||||
: value_(static_cast<int>(value))
|
||||
, size_(size)
|
||||
, type_(data_type_traits<Type>::type(size)) {}
|
||||
explicit value(basic_type data_type, size_t size = 0);
|
||||
value(const value &x) = default;
|
||||
value& operator=(const value &x) = default;
|
||||
@@ -74,11 +78,12 @@ public:
|
||||
[[nodiscard]] bool is_varchar() const;
|
||||
[[nodiscard]] bool is_date() const;
|
||||
[[nodiscard]] bool is_time() const;
|
||||
[[nodiscard]] bool is_timestamp() const;
|
||||
[[nodiscard]] bool is_blob() const;
|
||||
[[nodiscard]] bool is_null() const;
|
||||
|
||||
private:
|
||||
utils::database_type value_;
|
||||
database_type value_;
|
||||
size_t size_{};
|
||||
basic_type type_{basic_type::Null};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user