OmniSciDB  1dac507f6e
 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 63 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().

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

+ 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 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  default:
58  UNREACHABLE();
59  }
60  return "";
61 }
#define UNREACHABLE()
Definition: Logger.h:234

+ Here is the caller graph for this function: