implemented restoring of wiki tags from tag and bookmark database

This commit is contained in:
2025-09-12 01:56:28 +02:00
parent f13da92b48
commit 4bc717756f
9 changed files with 74 additions and 5 deletions

View File

@@ -70,7 +70,20 @@ CREATE TABLE IF NOT EXISTS {0} (
}
@Override
public Map<Long, Bookmark> find(long userId, Collection<String> keys) {
public Map<Long, String> findUrls(String key) {
try {
var map = new HashMap<Long,String>();
var rs = select(ALL).from(TABLE_URLS).where(URL, like(key)).exec(db);
while (rs.next()) map.put(rs.getLong(ID),rs.getString(URL));
rs.close();;
return map;
} catch (SQLException e) {
throw new UmbrellaException("Failed to load bookmark list");
}
}
@Override
public Map<Long, Bookmark> findUrls(long userId, Collection<String> keys) {
try {
var map = new HashMap<Long,Bookmark>();
var query = select(ALL).from(TABLE_URL_COMMENTS).leftJoin(URL_ID,TABLE_URLS,ID)