#pragma once #include #include #include #include namespace DB { /** Типы данных для представления значений из БД в оперативке. */ STRONG_TYPEDEF(char, Null); typedef Poco::UInt8 UInt8; typedef Poco::UInt16 UInt16; typedef Poco::UInt32 UInt32; typedef Poco::UInt64 UInt64; typedef Poco::Int8 Int8; typedef Poco::Int16 Int16; typedef Poco::Int32 Int32; typedef Poco::Int64 Int64; typedef float Float32; typedef double Float64; typedef std::string String; typedef std::vector Strings; template struct IsNumber { static const bool value = false; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template <> struct IsNumber { static const bool value = true; }; template struct TypeName; template <> struct TypeName { static std::string get() { return "Null"; } }; template <> struct TypeName { static std::string get() { return "UInt8"; } }; template <> struct TypeName { static std::string get() { return "UInt16"; } }; template <> struct TypeName { static std::string get() { return "UInt32"; } }; template <> struct TypeName { static std::string get() { return "UInt64"; } }; template <> struct TypeName { static std::string get() { return "Int8"; } }; template <> struct TypeName { static std::string get() { return "Int16"; } }; template <> struct TypeName { static std::string get() { return "Int32"; } }; template <> struct TypeName { static std::string get() { return "Int64"; } }; template <> struct TypeName { static std::string get() { return "Float32"; } }; template <> struct TypeName { static std::string get() { return "Float64"; } }; template <> struct TypeName { static std::string get() { return "String"; } }; /// Этот тип не поддерживается СУБД, но используется в некоторых внутренних преобразованиях. template <> struct TypeName{ static std::string get() { return "long double"; } }; }