Skip to content
Snippets Groups Projects
Commit c825637a authored by Steven Murray's avatar Steven Murray
Browse files

Added rdbms::Login::Login() and rdbms::Login::dbTypeToString()

parent 8b4705e0
Branches
Tags
No related merge requests found
......@@ -32,6 +32,14 @@ namespace rdbms {
//------------------------------------------------------------------------------
const char *Login::s_fileFormat = "either in_memory or oracle:username/password@database or sqlite:filename";
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
Login::Login():
dbType(DBTYPE_NONE),
port(0) {
}
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
......
......@@ -42,6 +42,28 @@ struct Login {
DBTYPE_NONE
};
/**
* Returns the string representation of the specified database type.
*
* @return The string representation of the specified database type.
*/
static std::string dbTypeToString(const DbType &dbType) {
switch(dbType) {
case DBTYPE_IN_MEMORY: return "DBTYPE_IN_MEMORY";
case DBTYPE_ORACLE: return "DBTYPE_ORACLE";
case DBTYPE_SQLITE: return "DBTYPE_SQLITE";
case DBTYPE_MYSQL: return "DBTYPE_MYSQL";
case DBTYPE_POSTGRESQL: return "DBTYPE_POSTGRESQL";
case DBTYPE_NONE: return "DBTYPE_NONE";
default: return "UNKNOWN";
}
}
/**
* Constructor.
*/
Login();
/**
* Constructor.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment