Enumeration of database types. More...
#include <opentrep/DBType.hpp>
Public Types | |
enum | EN_DBType { NODB = 0 , SQLITE3 , MYSQL , LAST_VALUE } |
Public Member Functions | |
EN_DBType | getType () const |
char | getTypeAsChar () const |
std::string | getTypeAsString () const |
const std::string | describe () const |
bool | operator== (const EN_DBType &) const |
bool | operator== (const DBType &) const |
DBType (const EN_DBType &) | |
DBType (const char iType) | |
DBType (const std::string &iType) | |
DBType (const DBType &) | |
Static Public Member Functions | |
static const std::string & | getLabel (const EN_DBType &) |
static EN_DBType | getType (const char) |
static char | getTypeLabel (const EN_DBType &) |
static std::string | getTypeLabelAsString (const EN_DBType &) |
static std::string | describeLabels () |
Enumeration of database types.
Definition at line 17 of file DBType.hpp.
Enumerator | |
---|---|
NODB | |
SQLITE3 | |
MYSQL | |
LAST_VALUE |
Definition at line 19 of file DBType.hpp.
OPENTREP::DBType::DBType | ( | const EN_DBType & | iDBType | ) |
Main constructor.
Definition at line 30 of file DBType.cpp.
References DBType().
Referenced by DBType(), DBType(), DBType(), DBType(), and operator==().
OPENTREP::DBType::DBType | ( | const char | iType | ) |
Alternative constructor.
Definition at line 56 of file DBType.cpp.
OPENTREP::DBType::DBType | ( | const std::string & | iType | ) |
Alternative constructor.
Definition at line 61 of file DBType.cpp.
References DBType(), describeLabels(), LAST_VALUE, MYSQL, NODB, and SQLITE3.
OPENTREP::DBType::DBType | ( | const DBType & | iDBType | ) |
|
static |
Get the label as a string (e.g., "NoDB", "SQLite3", "MySQL/MariaDB").
Definition at line 84 of file DBType.cpp.
|
static |
Get the type value from parsing a single char (e.g., 'N', 'S', 'M')
Definition at line 35 of file DBType.cpp.
References describeLabels(), LAST_VALUE, MYSQL, NODB, and SQLITE3.
Referenced by DBType().
|
static |
Get the label as a single char (e.g., 'N', 'S', 'M')
Definition at line 89 of file DBType.cpp.
|
static |
Get the label as a string of a single char (e.g., 'N', 'S', 'M')
Definition at line 94 of file DBType.cpp.
|
static |
DBType::EN_DBType OPENTREP::DBType::getType | ( | ) | const |
Get the enumerated value.
Definition at line 113 of file DBType.cpp.
char OPENTREP::DBType::getTypeAsChar | ( | ) | const |
Get the enumerated value as a short string (e.g., "N", "S", "M")
Definition at line 118 of file DBType.cpp.
std::string OPENTREP::DBType::getTypeAsString | ( | ) | const |
Get the enumerated value as a short string (e.g., "N", "S", "M")
Definition at line 124 of file DBType.cpp.
const std::string OPENTREP::DBType::describe | ( | ) | const |
Give a description of the structure (e.g., "NoDB", "SQLite3", "MySQL/MariaDB").
Definition at line 131 of file DBType.cpp.
Referenced by OPENTREP::DBManager::createSQLDBIndexes(), OPENTREP::DBManager::createSQLDBTables(), OPENTREP::getLocationList(), OPENTREP::DBManager::initSQLDBSession(), main(), and OPENTREP::DBManager::terminateSQLDBSession().
bool OPENTREP::DBType::operator== | ( | const EN_DBType & | iType | ) | const |
Comparison operators.
Definition at line 138 of file DBType.cpp.
bool OPENTREP::DBType::operator== | ( | const DBType & | iDBType | ) | const |
Definition at line 143 of file DBType.cpp.
References DBType().