本文整理汇总了C++中StringParser::getServer方法的典型用法代码示例。如果您正苦于以下问题:C++ StringParser::getServer方法的具体用法?C++ StringParser::getServer怎么用?C++ StringParser::getServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringParser
的用法示例。
在下文中一共展示了StringParser::getServer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: backupIncremental
ErrorCode _CCONV FSBase::backupIncremental(const char * path, unsigned * amountChanged)
{
if (path == nullptr)
return INVALIDARG;
StringParser otherParser;
if (!otherParser.initialize(path))
otherParser.setServer(path);
if (otherParser.getServer().empty())
return INVALIDARG;
if (!createDir(otherParser.getServer()))
return FAILEDTOGETWINDIR;
fstream file;
string data;
ErrorCode retVal = getLogFileData(otherParser.getServer(), file, data);
if (failed(retVal))
return retVal;
PathTimeLog log(parser.getServer(), data);
if (log.isCorrupted())
return LOG_CORRUPTED;
unsigned amountBackup = 0;
retVal = backupAux(parser.getServer(), otherParser.getServer(), &log.getLastBackupTime(), amountBackup);
if (failed(retVal))
return retVal;
replaceRecordInData(parser.getServer(), log.getNowTime(), data);
retVal = setLogFileData(otherParser.getServer(), file, data);
if (amountChanged != nullptr)
*amountChanged = amountBackup;
return retVal;
}
示例2: backupFull
ErrorCode _CCONV FSBase::backupFull(const char * path, unsigned * amountChanged)
{
if (path == nullptr)
return INVALIDARG;
StringParser otherParser;
if (!otherParser.initialize(path))
otherParser.setServer(path);
if (otherParser.getServer().empty())
return INVALIDARG;
if (!createDir(otherParser.getServer()))
return FAILEDTOGETWINDIR;
unsigned amountBackup = 0;
ErrorCode res = backupAux(parser.getServer(), otherParser.getServer(), NULL, amountBackup);
if (amountChanged != nullptr)
*amountChanged = amountBackup;
return res;
}
示例3: mergeServerDbTable
string mergeServerDbTable(const StringParser & parser)
{
string ret = d_makeWithQuotes(parser.getServer());
if (!parser.getDbName().empty())
{
ret += string(",") + d_makeWithQuotes(parser.getDbName()) + ',' +
d_makeWithQuotes(parser.getTableName());
}
return ret;
}
示例4: connectToDb
SQLRETURN connectToDb(HENV henv, const StringParser & parser, HDBC & hdbc)
{
SQLRETURN retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
check_rc(retcode, retcode);
//for massive copy
//retcode = SQLSetConnectAttr(hdbc, SQL_COPT_SS_BCP, (void *)SQL_BCP_ON, SQL_IS_INTEGER);
//check_rc(retcode, "SQLSetConnectAttr(hdbc1) Failed\n\n");
string szDSN = "Driver={SQL Server Native Client 11.0};Server=" + parser.getServer() + ";Database=" +
parser.getDbName() + ";UID=" + parser.getLogin() + ";PWD=" + parser.getPass();
retcode = connect(hdbc, (SQLCHAR*)szDSN.c_str());
if (!MYSQLSUCCESS(retcode))
{
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
return retcode;
}
//retcode = SQLSetConnectAttr(hdbc, SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)TRUE, 0);
return retcode;
}