|
a/src/rcldb/rclquery.cpp |
|
b/src/rcldb/rclquery.cpp |
|
... |
|
... |
158 |
|
158 |
|
159 |
void Query::setSortBy(const string& fld, bool ascending) {
|
159 |
void Query::setSortBy(const string& fld, bool ascending) {
|
160 |
if (fld.empty()) {
|
160 |
if (fld.empty()) {
|
161 |
m_sortField.erase();
|
161 |
m_sortField.erase();
|
162 |
} else {
|
162 |
} else {
|
163 |
m_sortField = m_db->getConf()->fieldCanon(fld);
|
163 |
m_sortField = m_db->getConf()->fieldQCanon(fld);
|
164 |
m_sortAscending = ascending;
|
164 |
m_sortAscending = ascending;
|
165 |
}
|
165 |
}
|
166 |
LOGDEB0(("RclQuery::setSortBy: [%s] %s\n", m_sortField.c_str(),
|
166 |
LOGDEB0(("RclQuery::setSortBy: [%s] %s\n", m_sortField.c_str(),
|
167 |
m_sortAscending ? "ascending" : "descending"));
|
167 |
m_sortAscending ? "ascending" : "descending"));
|
168 |
}
|
168 |
}
|