OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sqldefs.h File Reference

Common Enum definitions for SQL processing. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IS_COMPARISON(X)
 
#define IS_LOGIC(X)   ((X) == kAND || (X) == kOR)
 
#define IS_ARITHMETIC(X)   ((X) == kMINUS || (X) == kPLUS || (X) == kMULTIPLY || (X) == kDIVIDE || (X) == kMODULO)
 
#define COMMUTE_COMPARISON(X)   ((X) == kLT ? kGT : (X) == kLE ? kGE : (X) == kGT ? kLT : (X) == kGE ? kLE : (X))
 
#define IS_UNARY(X)   ((X) == kNOT || (X) == kUMINUS || (X) == kISNULL || (X) == kEXISTS || (X) == kCAST)
 
#define IS_EQUIVALENCE(X)   ((X) == kEQ || (X) == kBW_EQ || (X) == kOVERLAPS)
 

Enumerations

enum  SQLOps {
  kEQ = 0, kBW_EQ, kNE, kLT,
  kGT, kLE, kGE, kAND,
  kOR, kNOT, kMINUS, kPLUS,
  kMULTIPLY, kDIVIDE, kMODULO, kUMINUS,
  kISNULL, kISNOTNULL, kEXISTS, kCAST,
  kARRAY_AT, kUNNEST, kFUNCTION, kIN,
  kOVERLAPS
}
 
enum  SQLQualifier { kONE, kANY, kALL }
 
enum  SQLAgg {
  kAVG, kMIN, kMAX, kSUM,
  kCOUNT, kAPPROX_COUNT_DISTINCT, kSAMPLE
}
 
enum  SqlWindowFunctionKind {
  SqlWindowFunctionKind::ROW_NUMBER, SqlWindowFunctionKind::RANK, SqlWindowFunctionKind::DENSE_RANK, SqlWindowFunctionKind::PERCENT_RANK,
  SqlWindowFunctionKind::CUME_DIST, SqlWindowFunctionKind::NTILE, SqlWindowFunctionKind::LAG, SqlWindowFunctionKind::LEAD,
  SqlWindowFunctionKind::FIRST_VALUE, SqlWindowFunctionKind::LAST_VALUE, SqlWindowFunctionKind::AVG, SqlWindowFunctionKind::MIN,
  SqlWindowFunctionKind::MAX, SqlWindowFunctionKind::SUM, SqlWindowFunctionKind::COUNT, SqlWindowFunctionKind::SUM_INTERNAL
}
 
enum  SQLStmtType {
  kSELECT, kUPDATE, kINSERT, kDELETE,
  kCREATE_TABLE
}
 
enum  StorageOption { kDISK = 0, kGPU = 1, kCPU = 2 }
 
enum  ViewRefreshOption { kMANUAL = 0, kAUTO = 1, kIMMEDIATE = 2 }
 
enum  JoinType { JoinType::INNER, JoinType::LEFT, JoinType::INVALID }
 

Detailed Description

Common Enum definitions for SQL processing.

Author
Wei Hong wei@m.nosp@m.ap-d.nosp@m..com Copyright (c) 2014 MapD Technologies, Inc. All rights reserved.

Definition in file sqldefs.h.

Macro Definition Documentation

#define COMMUTE_COMPARISON (   X)    ((X) == kLT ? kGT : (X) == kLE ? kGE : (X) == kGT ? kLT : (X) == kGE ? kLE : (X))

Definition at line 63 of file sqldefs.h.

Referenced by Analyzer::BinOper::normalize_simple_predicate().

#define IS_ARITHMETIC (   X)    ((X) == kMINUS || (X) == kPLUS || (X) == kMULTIPLY || (X) == kDIVIDE || (X) == kMODULO)
#define IS_UNARY (   X)    ((X) == kNOT || (X) == kUMINUS || (X) == kISNULL || (X) == kEXISTS || (X) == kCAST)

Definition at line 65 of file sqldefs.h.

Enumeration Type Documentation

enum JoinType
strong
Enumerator
INNER 
LEFT 
INVALID 

Definition at line 98 of file sqldefs.h.

enum SQLAgg
Enumerator
kAVG 
kMIN 
kMAX 
kSUM 
kCOUNT 
kAPPROX_COUNT_DISTINCT 
kSAMPLE 

Definition at line 71 of file sqldefs.h.

enum SQLOps
Enumerator
kEQ 
kBW_EQ 
kNE 
kLT 
kGT 
kLE 
kGE 
kAND 
kOR 
kNOT 
kMINUS 
kPLUS 
kMULTIPLY 
kDIVIDE 
kMODULO 
kUMINUS 
kISNULL 
kISNOTNULL 
kEXISTS 
kCAST 
kARRAY_AT 
kUNNEST 
kFUNCTION 
kIN 
kOVERLAPS 

Definition at line 29 of file sqldefs.h.

29  {
30  kEQ = 0,
31  kBW_EQ,
32  kNE,
33  kLT,
34  kGT,
35  kLE,
36  kGE,
37  kAND,
38  kOR,
39  kNOT,
40  kMINUS,
41  kPLUS,
42  kMULTIPLY,
43  kDIVIDE,
44  kMODULO,
45  kUMINUS,
46  kISNULL,
47  kISNOTNULL,
48  kEXISTS,
49  kCAST,
50  kARRAY_AT,
51  kUNNEST,
52  kFUNCTION,
53  kIN,
54  kOVERLAPS
55 };
Definition: sqldefs.h:35
Definition: sqldefs.h:36
Definition: sqldefs.h:38
Definition: sqldefs.h:49
Definition: sqldefs.h:30
Definition: sqldefs.h:41
Definition: sqldefs.h:37
Definition: sqldefs.h:34
Definition: sqldefs.h:40
Definition: sqldefs.h:32
Definition: sqldefs.h:53
Definition: sqldefs.h:31
Definition: sqldefs.h:33
Definition: sqldefs.h:39
Enumerator
kONE 
kANY 
kALL 

Definition at line 69 of file sqldefs.h.

69 { kONE, kANY, kALL };
Definition: sqldefs.h:69
Definition: sqldefs.h:69
Definition: sqldefs.h:69
Enumerator
kSELECT 
kUPDATE 
kINSERT 
kDELETE 
kCREATE_TABLE 

Definition at line 92 of file sqldefs.h.

enum SqlWindowFunctionKind
strong
Enumerator
ROW_NUMBER 
RANK 
DENSE_RANK 
PERCENT_RANK 
CUME_DIST 
NTILE 
LAG 
LEAD 
FIRST_VALUE 
LAST_VALUE 
AVG 
MIN 
MAX 
SUM 
COUNT 
SUM_INTERNAL 

Definition at line 73 of file sqldefs.h.

Enumerator
kDISK 
kGPU 
kCPU 

Definition at line 94 of file sqldefs.h.

94 { kDISK = 0, kGPU = 1, kCPU = 2 };
Definition: sqldefs.h:94
Definition: sqldefs.h:94
Definition: sqldefs.h:94
Enumerator
kMANUAL 
kAUTO 
kIMMEDIATE 

Definition at line 96 of file sqldefs.h.

96 { kMANUAL = 0, kAUTO = 1, kIMMEDIATE = 2 };
Definition: sqldefs.h:96