mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-19 20:04:24 -04:00
Optimized SELECT creation in RetroDb::sqlQuery
This commit is contained in:
parent
ab538c6d28
commit
b8edb75895
1 changed files with 4 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue