Loading src/DBManager.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, std::stringstream valuesStream; std::stringstream keyValuesStream; std::string databaseTable = m_configuration_sp->getDatabaseTable(); //DtDate list for(int i = 0; i<row.date_list_size(); ++i) { Loading @@ -185,7 +187,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, boost::posix_time::ptime timestamp = boost::posix_time::ptime_from_tm(tmTimestamp); keysStream << row.date_list(i).key() << ","; keysStream << databaseTable << "." << row.date_list(i).key() << ","; valuesStream << "'" << boost::posix_time::to_iso_string(timestamp) << "',"; keyValuesStream << row.date_list(i).key() << "='" << boost::posix_time::to_iso_string(timestamp) << "',"; Loading @@ -194,7 +196,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtDouble list for(int i = 0; i<row.double_list_size(); ++i) { keysStream << row.double_list(i).key() << ","; keysStream << databaseTable << "." << row.double_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.double_list(i).value()) << ","; keyValuesStream << row.double_list(i).key() << "=" << row.double_list(i).value() << ","; Loading @@ -203,7 +205,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtInteger list for(int i = 0; i<row.integer_list_size(); ++i) { keysStream << row.integer_list(i).key() << ","; keysStream << databaseTable << "." << row.integer_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.integer_list(i).value()) << ","; keyValuesStream << row.integer_list(i).key() << "=" << row.integer_list(i).value() << ","; Loading @@ -212,7 +214,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtLongLong list for(int i = 0; i<row.long_long_list_size(); ++i) { keysStream << row.long_long_list(i).key() << ","; keysStream << databaseTable << "." << row.long_long_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.long_long_list(i).value()) << ","; keyValuesStream << row.long_long_list(i).key() << "=" << row.long_long_list(i).value() << ","; Loading @@ -221,7 +223,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtString list for(int i = 0; i<row.strings_list_size(); ++i) { keysStream << row.strings_list(i).key() << ","; keysStream << databaseTable << "." << row.strings_list(i).key() << ","; valuesStream << "'" << row.strings_list(i).value() << "',"; keyValuesStream << row.strings_list(i).key() << "='" << row.strings_list(i).value() << "',"; Loading @@ -230,7 +232,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtUnsignedLong list for(int i = 0; i<row.unsinged_long_list_size(); ++i) { keysStream << row.unsinged_long_list(i).key() << ","; keysStream << databaseTable << "." << row.unsinged_long_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.unsinged_long_list(i).value()) << ","; keyValuesStream << row.unsinged_long_list(i).key() << "=" << row.unsinged_long_list(i).value() << ","; Loading Loading
src/DBManager.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -177,6 +177,8 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, std::stringstream valuesStream; std::stringstream keyValuesStream; std::string databaseTable = m_configuration_sp->getDatabaseTable(); //DtDate list for(int i = 0; i<row.date_list_size(); ++i) { Loading @@ -185,7 +187,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, boost::posix_time::ptime timestamp = boost::posix_time::ptime_from_tm(tmTimestamp); keysStream << row.date_list(i).key() << ","; keysStream << databaseTable << "." << row.date_list(i).key() << ","; valuesStream << "'" << boost::posix_time::to_iso_string(timestamp) << "',"; keyValuesStream << row.date_list(i).key() << "='" << boost::posix_time::to_iso_string(timestamp) << "',"; Loading @@ -194,7 +196,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtDouble list for(int i = 0; i<row.double_list_size(); ++i) { keysStream << row.double_list(i).key() << ","; keysStream << databaseTable << "." << row.double_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.double_list(i).value()) << ","; keyValuesStream << row.double_list(i).key() << "=" << row.double_list(i).value() << ","; Loading @@ -203,7 +205,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtInteger list for(int i = 0; i<row.integer_list_size(); ++i) { keysStream << row.integer_list(i).key() << ","; keysStream << databaseTable << "." << row.integer_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.integer_list(i).value()) << ","; keyValuesStream << row.integer_list(i).key() << "=" << row.integer_list(i).value() << ","; Loading @@ -212,7 +214,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtLongLong list for(int i = 0; i<row.long_long_list_size(); ++i) { keysStream << row.long_long_list(i).key() << ","; keysStream << databaseTable << "." << row.long_long_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.long_long_list(i).value()) << ","; keyValuesStream << row.long_long_list(i).key() << "=" << row.long_long_list(i).value() << ","; Loading @@ -221,7 +223,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtString list for(int i = 0; i<row.strings_list_size(); ++i) { keysStream << row.strings_list(i).key() << ","; keysStream << databaseTable << "." << row.strings_list(i).key() << ","; valuesStream << "'" << row.strings_list(i).value() << "',"; keyValuesStream << row.strings_list(i).key() << "='" << row.strings_list(i).value() << "',"; Loading @@ -230,7 +232,7 @@ std::string DBManager::composeInsertQuery(std::string schema, std::string table, //DtUnsignedLong list for(int i = 0; i<row.unsinged_long_list_size(); ++i) { keysStream << row.unsinged_long_list(i).key() << ","; keysStream << databaseTable << "." << row.unsinged_long_list(i).key() << ","; valuesStream << boost::lexical_cast<std::string>(row.unsinged_long_list(i).value()) << ","; keyValuesStream << row.unsinged_long_list(i).key() << "=" << row.unsinged_long_list(i).value() << ","; Loading