mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 23:49:38 -05:00
Optimized SELECT creation in RetroDb::sqlQuery
This commit is contained in:
parent
ab538c6d28
commit
b8edb75895
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user