OmniSciDB  06b3bd477c
 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 65 of file DateTimeTranslator.cpp.

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

Referenced by DateTruncExpr::generate().

65  {
66  switch (fieldno) {
67  case dtYEAR:
68  return "year";
69  case dtQUARTER:
70  return "quarter";
71  case dtMONTH:
72  return "month";
73  case dtQUARTERDAY:
74  return "quarterday";
75  case dtDAY:
76  return "day";
77  case dtHOUR:
78  return "hour";
79  case dtMINUTE:
80  return "minute";
81  case dtSECOND:
82  return "second";
83  case dtMILLENNIUM:
84  return "millennium";
85  case dtCENTURY:
86  return "century";
87  case dtDECADE:
88  return "decade";
89  case dtMILLISECOND:
90  return "millisecond";
91  case dtMICROSECOND:
92  return "microsecond";
93  case dtNANOSECOND:
94  return "nanosecond";
95  case dtWEEK:
96  return "week";
97  case dtINVALID:
98  default:
99  UNREACHABLE();
100  }
101  return "";
102 }
#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, 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 kDATEEPOCH:
58  return "dateepoch";
59  default:
60  UNREACHABLE();
61  }
62  return "";
63 }
#define UNREACHABLE()
Definition: Logger.h:241

+ Here is the caller graph for this function: