revisiondaosqlite: fix sorting
This commit is contained in:
parent
882871c34f
commit
d3af8d8c53
@ -53,7 +53,7 @@ std::vector<Revision> RevisionDaoSqlite::getAllRevisions(QueryOption &options)
|
|||||||
SqliteQueryOption queryOption{options};
|
SqliteQueryOption queryOption{options};
|
||||||
std::string queryOptionSql = queryOption.setPrependWhere(true)
|
std::string queryOptionSql = queryOption.setPrependWhere(true)
|
||||||
.setVisibleColumnName("page.visible")
|
.setVisibleColumnName("page.visible")
|
||||||
.setOrderByColumn("revisionid")
|
.setOrderByColumn("creationtime")
|
||||||
.build();
|
.build();
|
||||||
auto query =
|
auto query =
|
||||||
*db
|
*db
|
||||||
@ -92,7 +92,7 @@ std::vector<Revision> RevisionDaoSqlite::getAllRevisionsForPage(std::string page
|
|||||||
SqliteQueryOption queryOption{option};
|
SqliteQueryOption queryOption{option};
|
||||||
std::string queryOptionSql = queryOption.setPrependWhere(false)
|
std::string queryOptionSql = queryOption.setPrependWhere(false)
|
||||||
.setVisibleColumnName("page.visible")
|
.setVisibleColumnName("page.visible")
|
||||||
.setOrderByColumn("revisionid")
|
.setOrderByColumn("creationtime")
|
||||||
.build();
|
.build();
|
||||||
auto query = *db << "SELECT (SELECT username FROM user WHERE id = author), comment, content, "
|
auto query = *db << "SELECT (SELECT username FROM user WHERE id = author), comment, content, "
|
||||||
"strftime('%s',creationtime), page.name, revisionid FROM revision INNER JOIN page ON "
|
"strftime('%s',creationtime), page.name, revisionid FROM revision INNER JOIN page ON "
|
||||||
|
Loading…
Reference in New Issue
Block a user