OmniSciDB  2e3a973ef4
anonymous_namespace{DateTimeIR.cpp} Namespace Reference

Functions

const char * get_extract_function_name (ExtractField field)
 

Function Documentation

◆ get_extract_function_name()

const char* anonymous_namespace{DateTimeIR.cpp}::get_extract_function_name ( ExtractField  field)

Definition at line 26 of file DateTimeIR.cpp.

References kDATEEPOCH, kDAY, kDOW, kDOY, kEPOCH, kHOUR, kISODOW, kMICROSECOND, kMILLISECOND, kMINUTE, kMONTH, kNANOSECOND, kQUARTER, kQUARTERDAY, kSECOND, kWEEK, kYEAR, and UNREACHABLE.

Referenced by CodeGenerator::codegen().

26  {
27  switch (field) {
28  case kEPOCH:
29  return "extract_epoch";
30  case kDATEEPOCH:
31  return "extract_dateepoch";
32  case kQUARTERDAY:
33  return "extract_quarterday";
34  case kHOUR:
35  return "extract_hour";
36  case kMINUTE:
37  return "extract_minute";
38  case kSECOND:
39  return "extract_second";
40  case kMILLISECOND:
41  return "extract_millisecond";
42  case kMICROSECOND:
43  return "extract_microsecond";
44  case kNANOSECOND:
45  return "extract_nanosecond";
46  case kDOW:
47  return "extract_dow";
48  case kISODOW:
49  return "extract_isodow";
50  case kDAY:
51  return "extract_day";
52  case kWEEK:
53  return "extract_week";
54  case kDOY:
55  return "extract_day_of_year";
56  case kMONTH:
57  return "extract_month";
58  case kQUARTER:
59  return "extract_quarter";
60  case kYEAR:
61  return "extract_year";
62  }
63  UNREACHABLE();
64  return "";
65 }
#define UNREACHABLE()
Definition: Logger.h:241
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
+ Here is the caller graph for this function: