24 #include <string_view>
26 template <SQLTypes SQL_TYPE>
39 template <SQLTypes SQL_TYPE>
41 if (
auto const time = dateTimeParseOptional<SQL_TYPE>(s, dim)) {
44 throw std::runtime_error(
cat(
"Invalid ",
toString(SQL_TYPE),
" string (", s,
')'));
58 std::optional<int64_t>
parse(std::string_view
const,
unsigned dim);
71 std::optional<bool>
p;
73 int64_t
getTime(
unsigned const dim)
const;
std::optional< int64_t > parse(std::string_view const, unsigned dim)
std::optional< int64_t > dateTimeParseOptional(std::string_view, unsigned const dim)
bool updateDateTimeAndStr(char const field, std::string_view &)
std::string_view unparsed_
friend std::ostream & operator<<(std::ostream &, DateTime const &)
Constants for Builtin SQL Types supported by HEAVY.AI.
bool parseWithFormat(std::string_view format, std::string_view &str)
std::optional< int64_t > dateTimeParseOptional< kTIME >(std::string_view str, unsigned const dim)
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
std::optional< int64_t > dateTimeParseOptional< kDATE >(std::string_view str, unsigned const dim)
std::optional< int64_t > dateTimeParseOptional< kTIMESTAMP >(std::string_view str, unsigned const dim)
int64_t getTime(unsigned const dim) const
std::string toString(const Executor::ExtModuleKinds &kind)
int64_t dateTimeParse(std::string_view const s, unsigned const dim)
void setFormatType(FormatType)
std::string_view unparsed() const