OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EmbeddedDatabase Namespace Reference

Namespaces

 anonymous_namespace{DBEngine.cpp}
 

Classes

class  CursorImpl
 
class  DBEngineImpl
 
class  Cursor
 
class  DBEngine
 
class  ColumnDetails
 
class  Row
 

Enumerations

enum  ColumnType {
  ColumnType::SMALLINT = 0, ColumnType::INT = 1, ColumnType::BIGINT = 2, ColumnType::FLOAT = 3,
  ColumnType::DECIMAL = 4, ColumnType::DOUBLE = 5, ColumnType::STR = 6, ColumnType::TIME = 7,
  ColumnType::TIMESTAMP = 8, ColumnType::DATE = 9, ColumnType::BOOL = 10, ColumnType::INTERVAL_DAY_TIME = 11,
  ColumnType::INTERVAL_YEAR_MONTH = 12, ColumnType::POINT = 13, ColumnType::LINESTRING = 14, ColumnType::POLYGON = 15,
  ColumnType::MULTIPOLYGON = 16, ColumnType::TINYINT = 17, ColumnType::GEOMETRY = 18, ColumnType::GEOGRAPHY = 19,
  ColumnType::UNKNOWN = 20
}
 
enum  ColumnEncoding {
  ColumnEncoding::NONE = 0, ColumnEncoding::FIXED = 1, ColumnEncoding::RL = 2, ColumnEncoding::DIFF = 3,
  ColumnEncoding::DICT = 4, ColumnEncoding::SPARSE = 5, ColumnEncoding::GEOINT = 6, ColumnEncoding::DATE_IN_DAYS = 7
}
 

Functions

DBEngineImplgetImpl (DBEngine *ptr)
 
const DBEngineImplgetImpl (const DBEngine *ptr)
 
CursorImplgetImpl (Cursor *ptr)
 
const CursorImplgetImpl (const Cursor *ptr)
 
ColumnType sqlToColumnType (const SQLTypes &type)
 
ColumnEncoding sqlToColumnEncoding (const EncodingType &type)
 

Enumeration Type Documentation

Enumerator
SMALLINT 
INT 
BIGINT 
FLOAT 
DECIMAL 
DOUBLE 
STR 
TIME 
TIMESTAMP 
DATE 
BOOL 
INTERVAL_DAY_TIME 
INTERVAL_YEAR_MONTH 
POINT 
LINESTRING 
POLYGON 
MULTIPOLYGON 
TINYINT 
GEOMETRY 
GEOGRAPHY 
UNKNOWN 

Definition at line 24 of file DBETypes.h.

24  {
25  SMALLINT = 0,
26  INT = 1,
27  BIGINT = 2,
28  FLOAT = 3,
29  DECIMAL = 4,
30  DOUBLE = 5,
31  STR = 6,
32  TIME = 7,
33  TIMESTAMP = 8,
34  DATE = 9,
35  BOOL = 10,
36  INTERVAL_DAY_TIME = 11,
38  POINT = 13,
39  LINESTRING = 14,
40  POLYGON = 15,
41  MULTIPOLYGON = 16,
42  TINYINT = 17,
43  GEOMETRY = 18,
44  GEOGRAPHY = 19,
45  UNKNOWN = 20
46 };
#define LINESTRING
#define GEOMETRY
#define SMALLINT
#define DOUBLE
#define BIGINT
#define DATE
#define MULTIPOLYGON
#define POINT
#define TIME
#define TINYINT
#define TIMESTAMP
#define DECIMAL
#define GEOGRAPHY
#define POLYGON
#define FLOAT

Function Documentation

const DBEngineImpl* EmbeddedDatabase::getImpl ( const DBEngine *  ptr)
inline

Definition at line 456 of file DBEngine.cpp.

456  {
457  return (const DBEngineImpl*)ptr;
458 }
CursorImpl* EmbeddedDatabase::getImpl ( Cursor *  ptr)
inline

Cursor downcasting methods

Definition at line 508 of file DBEngine.cpp.

508  {
509  return (CursorImpl*)ptr;
510 }
const CursorImpl* EmbeddedDatabase::getImpl ( const Cursor *  ptr)
inline

Definition at line 512 of file DBEngine.cpp.

512  {
513  return (const CursorImpl*)ptr;
514 }
ColumnEncoding EmbeddedDatabase::sqlToColumnEncoding ( const EncodingType type)

Definition at line 162 of file DBETypes.cpp.

References DATE_IN_DAYS, DICT, DIFF, FIXED, GEOINT, kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_DIFF, kENCODING_FIXED, kENCODING_GEOINT, kENCODING_NONE, kENCODING_RL, kENCODING_SPARSE, NONE, RL, and SPARSE.

Referenced by EmbeddedDatabase::DBEngineImpl::getTableDetails().

162  {
163  switch (type) {
164  case kENCODING_NONE:
165  return ColumnEncoding::NONE;
166  case kENCODING_FIXED:
167  return ColumnEncoding::FIXED;
168  case kENCODING_RL:
169  return ColumnEncoding::RL;
170  case kENCODING_DIFF:
171  return ColumnEncoding::DIFF;
172  case kENCODING_DICT:
173  return ColumnEncoding::DICT;
174  case kENCODING_SPARSE:
175  return ColumnEncoding::SPARSE;
176  case kENCODING_GEOINT:
177  return ColumnEncoding::GEOINT;
179  return ColumnEncoding::DATE_IN_DAYS;
180  default:
181  return ColumnEncoding::NONE;
182  }
183  return ColumnEncoding::NONE;
184 }

+ Here is the caller graph for this function:

ColumnType EmbeddedDatabase::sqlToColumnType ( const SQLTypes type)

Definition at line 111 of file DBETypes.cpp.

References BIGINT, BOOL, DATE, DECIMAL, DOUBLE, FLOAT, GEOGRAPHY, GEOMETRY, INT, INTERVAL_DAY_TIME, INTERVAL_YEAR_MONTH, kBIGINT, kBOOLEAN, kCHAR, kDATE, kDECIMAL, kDOUBLE, kFLOAT, kGEOGRAPHY, kGEOMETRY, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, LINESTRING, MULTIPOLYGON, POINT, POLYGON, SMALLINT, STR, TIME, TIMESTAMP, TINYINT, and UNKNOWN.

Referenced by EmbeddedDatabase::CursorImpl::getColType(), and EmbeddedDatabase::DBEngineImpl::getTableDetails().

111  {
112  switch (type) {
113  case kBOOLEAN:
114  return ColumnType::BOOL;
115  case kTINYINT:
116  return ColumnType::TINYINT;
117  case kSMALLINT:
118  return ColumnType::SMALLINT;
119  case kINT:
120  return ColumnType::INT;
121  case kBIGINT:
122  return ColumnType::BIGINT;
123  case kFLOAT:
124  return ColumnType::FLOAT;
125  case kNUMERIC:
126  case kDECIMAL:
127  return ColumnType::DECIMAL;
128  case kDOUBLE:
129  return ColumnType::DOUBLE;
130  case kTEXT:
131  case kVARCHAR:
132  case kCHAR:
133  return ColumnType::STR;
134  case kTIME:
135  return ColumnType::TIME;
136  case kTIMESTAMP:
137  return ColumnType::TIMESTAMP;
138  case kDATE:
139  return ColumnType::DATE;
140  case kINTERVAL_DAY_TIME:
141  return ColumnType::INTERVAL_DAY_TIME;
143  return ColumnType::INTERVAL_YEAR_MONTH;
144  case kPOINT:
145  return ColumnType::POINT;
146  case kLINESTRING:
147  return ColumnType::LINESTRING;
148  case kPOLYGON:
149  return ColumnType::POLYGON;
150  case kMULTIPOLYGON:
152  case kGEOMETRY:
153  return ColumnType::GEOMETRY;
154  case kGEOGRAPHY:
155  return ColumnType::GEOGRAPHY;
156  default:
157  return ColumnType::UNKNOWN;
158  }
159  return ColumnType::UNKNOWN;
160 }
#define LINESTRING
Definition: sqltypes.h:48
#define GEOMETRY
#define SMALLINT
#define DOUBLE
#define BIGINT
#define DATE
#define MULTIPOLYGON
#define POINT
#define TIME
#define TINYINT
Definition: sqltypes.h:51
Definition: sqltypes.h:52
#define TIMESTAMP
Definition: sqltypes.h:40
#define DECIMAL
#define GEOGRAPHY
#define POLYGON
Definition: sqltypes.h:44
#define FLOAT

+ Here is the caller graph for this function: