OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{DateTimeTranslator.cpp} Namespace Reference

Functions

std::string from_extract_field (const ExtractField &fieldno)
 
std::string from_datetrunc_field (const DatetruncField &fieldno)
 

Function Documentation

std::string anonymous_namespace{DateTimeTranslator.cpp}::from_datetrunc_field ( const DatetruncField fieldno)

Definition at line 69 of file DateTimeTranslator.cpp.

References dtCENTURY, dtDAY, dtDECADE, dtHOUR, dtINVALID, dtMICROSECOND, dtMILLENNIUM, dtMILLISECOND, dtMINUTE, dtMONTH, dtNANOSECOND, dtQUARTER, dtQUARTERDAY, dtSECOND, dtWEEK, dtWEEK_SATURDAY, dtWEEK_SUNDAY, dtYEAR, and UNREACHABLE.

Referenced by DateTruncExpr::generate().

69  {
70  switch (fieldno) {
71  case dtYEAR:
72  return "year";
73  case dtQUARTER:
74  return "quarter";
75  case dtMONTH:
76  return "month";
77  case dtQUARTERDAY:
78  return "quarterday";
79  case dtDAY:
80  return "day";
81  case dtHOUR:
82  return "hour";
83  case dtMINUTE:
84  return "minute";
85  case dtSECOND:
86  return "second";
87  case dtMILLENNIUM:
88  return "millennium";
89  case dtCENTURY:
90  return "century";
91  case dtDECADE:
92  return "decade";
93  case dtMILLISECOND:
94  return "millisecond";
95  case dtMICROSECOND:
96  return "microsecond";
97  case dtNANOSECOND:
98  return "nanosecond";
99  case dtWEEK:
100  return "week";
101  case dtWEEK_SUNDAY:
102  return "week_sunday";
103  case dtWEEK_SATURDAY:
104  return "week_saturday";
105  case dtINVALID:
106  default:
107  UNREACHABLE();
108  }
109  return "";
110 }
#define UNREACHABLE()
Definition: Logger.h:241

+ Here is the caller graph for this function:

std::string anonymous_namespace{DateTimeTranslator.cpp}::from_extract_field ( const ExtractField fieldno)

Definition at line 23 of file DateTimeTranslator.cpp.

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

Referenced by ExtractExpr::generate().

23  {
24  switch (fieldno) {
25  case kYEAR:
26  return "year";
27  case kQUARTER:
28  return "quarter";
29  case kMONTH:
30  return "month";
31  case kDAY:
32  return "day";
33  case kHOUR:
34  return "hour";
35  case kMINUTE:
36  return "minute";
37  case kSECOND:
38  return "second";
39  case kMILLISECOND:
40  return "millisecond";
41  case kMICROSECOND:
42  return "microsecond";
43  case kNANOSECOND:
44  return "nanosecond";
45  case kDOW:
46  return "dow";
47  case kISODOW:
48  return "isodow";
49  case kDOY:
50  return "doy";
51  case kEPOCH:
52  return "epoch";
53  case kQUARTERDAY:
54  return "quarterday";
55  case kWEEK:
56  return "week";
57  case kWEEK_SUNDAY:
58  return "week_sunday";
59  case kWEEK_SATURDAY:
60  return "week_saturday";
61  case kDATEEPOCH:
62  return "dateepoch";
63  default:
64  UNREACHABLE();
65  }
66  return "";
67 }
#define UNREACHABLE()
Definition: Logger.h:241

+ Here is the caller graph for this function: