OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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

Function Documentation

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

Definition at line 464 of file DBEngine.cpp.

464  {
465  return (const DBEngineImpl*)ptr;
466 }
CursorImpl* EmbeddedDatabase::getImpl ( Cursor *  ptr)
inline

Cursor downcasting methods

Definition at line 516 of file DBEngine.cpp.

516  {
517  return (CursorImpl*)ptr;
518 }
const CursorImpl* EmbeddedDatabase::getImpl ( const Cursor *  ptr)
inline

Definition at line 520 of file DBEngine.cpp.

520  {
521  return (const CursorImpl*)ptr;
522 }
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:
151  return ColumnType::MULTIPOLYGON;
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 }
Definition: sqltypes.h:49
Definition: sqltypes.h:52
Definition: sqltypes.h:53
Definition: sqltypes.h:41
Definition: sqltypes.h:45

+ Here is the caller graph for this function: