|
a/src/rcldb/rclquery.cpp |
|
b/src/rcldb/rclquery.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.9 2008-09-29 11:33:55 dockes Exp $ (C) 2008 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: rclquery.cpp,v 1.10 2008-10-07 06:44:23 dockes Exp $ (C) 2008 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
|
4 |
|
5 |
#include <stdlib.h>
|
5 |
#include <stdlib.h>
|
6 |
#include <string.h>
|
6 |
#include <string.h>
|
7 |
|
7 |
|
|
... |
|
... |
112 |
return m_db;
|
112 |
return m_db;
|
113 |
}
|
113 |
}
|
114 |
|
114 |
|
115 |
void Query::setSortBy(const string& fld, bool ascending) {
|
115 |
void Query::setSortBy(const string& fld, bool ascending) {
|
116 |
RclConfig *cfg = RclConfig::getMainConfig();
|
116 |
RclConfig *cfg = RclConfig::getMainConfig();
|
117 |
m_sortField = cfg->fieldCanon(stringtolower(fld));
|
117 |
m_sortField = cfg->fieldCanon(fld);
|
118 |
m_sortAscending = ascending;
|
118 |
m_sortAscending = ascending;
|
119 |
LOGDEB0(("RclQuery::setSortBy: [%s] %s\n", m_sortField.c_str(),
|
119 |
LOGDEB0(("RclQuery::setSortBy: [%s] %s\n", m_sortField.c_str(),
|
120 |
m_sortAscending ? "ascending" : "descending"));
|
120 |
m_sortAscending ? "ascending" : "descending"));
|
121 |
}
|
121 |
}
|
122 |
|
122 |
|