OmniSciDB
a5dc49c757
|
#include "DateTimeParser.h"
#include "StringTransform.h"
#include <boost/algorithm/string/predicate.hpp>
#include <algorithm>
#include <array>
#include <cctype>
#include <charconv>
#include <limits>
#include <sstream>
#include <vector>
Go to the source code of this file.
Namespaces | |
anonymous_namespace{DateTimeParser.cpp} | |
Functions | |
int64_t | anonymous_namespace{DateTimeParser.cpp}::daysFromCivil (int64_t y, unsigned const m, unsigned const d) |
std::vector< std::vector < std::string_view > > | anonymous_namespace{DateTimeParser.cpp}::formatViews () |
void | anonymous_namespace{DateTimeParser.cpp}::eatMonth (unsigned const month, std::string_view &str) |
void | anonymous_namespace{DateTimeParser.cpp}::eatSpace (std::string_view &str) |
template<typename T > | |
std::optional< T > | anonymous_namespace{DateTimeParser.cpp}::fromChars (std::string_view &str, size_t maxlen=std::numeric_limits< size_t >::max()) |
std::optional< int64_t > | anonymous_namespace{DateTimeParser.cpp}::unixTime (std::string_view const str) |
template<> | |
std::optional< int64_t > | dateTimeParseOptional< kTIME > (std::string_view str, unsigned const dim) |
template<> | |
std::optional< int64_t > | dateTimeParseOptional< kTIMESTAMP > (std::string_view str, unsigned const dim) |
template<> | |
std::optional< int64_t > | dateTimeParseOptional< kDATE > (std::string_view str, unsigned const dim) |
std::ostream & | operator<< (std::ostream &out, DateTimeParser::DateTime const &dt) |
Variables | |
constexpr std::array< int, 12 > | anonymous_namespace{DateTimeParser.cpp}::month_prefixes |
constexpr std::array < std::string_view, 13 > | anonymous_namespace{DateTimeParser.cpp}::month_suffixes |
constexpr unsigned | anonymous_namespace{DateTimeParser.cpp}::pow_10 [10] {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000} |
std::optional<int64_t> dateTimeParseOptional< kDATE > | ( | std::string_view | str, |
unsigned const | dim | ||
) |
Definition at line 190 of file DateTimeParser.cpp.
References DateTimeParser::Date, DateTimeParser::parse(), run_benchmark_import::parser, DateTimeParser::setFormatType(), DateTimeParser::Timezone, anonymous_namespace{DateTimeParser.cpp}::unixTime(), and DateTimeParser::unparsed().
Referenced by import_export::Detector::detect_sqltype().
std::optional<int64_t> dateTimeParseOptional< kTIME > | ( | std::string_view | str, |
unsigned const | dim | ||
) |
Definition at line 135 of file DateTimeParser.cpp.
References DateTimeParser::parse(), run_benchmark_import::parser, DateTimeParser::setFormatType(), DateTimeParser::Time, DateTimeParser::Timezone, and DateTimeParser::unparsed().
Referenced by import_export::Detector::detect_sqltype().
std::optional<int64_t> dateTimeParseOptional< kTIMESTAMP > | ( | std::string_view | str, |
unsigned const | dim | ||
) |
Definition at line 159 of file DateTimeParser.cpp.
References DateTimeParser::Date, DateTimeParser::parse(), run_benchmark_import::parser, DateTimeParser::setFormatType(), DateTimeParser::Time, DateTimeParser::Timezone, anonymous_namespace{DateTimeParser.cpp}::unixTime(), and DateTimeParser::unparsed().
Referenced by import_export::Detector::detect_sqltype().
std::ostream& operator<< | ( | std::ostream & | out, |
DateTimeParser::DateTime const & | dt | ||
) |
Definition at line 398 of file DateTimeParser.cpp.
References DateTimeParser::DateTime::d, DateTimeParser::DateTime::H, DateTimeParser::DateTime::m, DateTimeParser::DateTime::M, DateTimeParser::DateTime::n, DateTimeParser::DateTime::p, DateTimeParser::DateTime::S, DateTimeParser::DateTime::Y, and DateTimeParser::DateTime::z.