improvemnts:
- ordering of bookmarks - limitation of bookmarks on index page - date for bookmarks that did not have a date before the transition
This commit is contained in:
@@ -69,10 +69,10 @@ CREATE TABLE IF NOT EXISTS {0} (
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, Bookmark> list(long userId) {
|
||||
public Map<Long, Bookmark> list(long userId, long offset, long limit) {
|
||||
try {
|
||||
var map = new HashMap<Long,Bookmark>();
|
||||
var rs = select(ALL).from(TABLE_URL_COMMENTS).leftJoin(URL_ID,TABLE_URLS,ID).where(USER_ID, equal(userId)).exec(db);
|
||||
var rs = select(ALL).from(TABLE_URL_COMMENTS).leftJoin(URL_ID,TABLE_URLS,ID).where(USER_ID, equal(userId)).sort(format("{0} DESC",TIMESTAMP)).skip(offset).limit(limit).exec(db);
|
||||
while (rs.next()){
|
||||
var bookmark = Bookmark.of(rs);
|
||||
map.put(bookmark.urlId(),bookmark);
|
||||
|
||||
Reference in New Issue
Block a user