Optimized SELECT creation in RetroDb::sqlQuery

This commit is contained in:
thunder2 2015-08-10 15:24:56 +02:00
parent ab538c6d28
commit b8edb75895

View File

@ -183,12 +183,11 @@ RetroCursor* RetroDb::sqlQuery(const std::string& tableName, const std::list<std
std::list<std::string>::const_iterator it = columns.begin(); std::list<std::string>::const_iterator it = columns.begin();
for(; it != columns.end(); ++it){ for(; it != columns.end(); ++it){
columnSelection += *it; if (it != columns.begin()) {
++it;
if(it != columns.end())
columnSelection += ","; columnSelection += ",";
--it; }
columnSelection += *it;
} }
// construct query // construct query