Update wikivoyage db scheme
This commit is contained in:
parent
3af97535dc
commit
8b2eed3f98
2 changed files with 9 additions and 1 deletions
|
@ -24,6 +24,7 @@ public class WikivoyageArticle {
|
|||
long cityId;
|
||||
long originalId;
|
||||
String lang;
|
||||
String aggregatedPartOf;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
|
@ -69,6 +70,10 @@ public class WikivoyageArticle {
|
|||
return lang;
|
||||
}
|
||||
|
||||
public String getAggregatedPartOf() {
|
||||
return aggregatedPartOf;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String getThumbImageUrl(@NonNull String imageTitle) {
|
||||
String[] hash = getHash(imageTitle);
|
||||
|
|
|
@ -39,6 +39,7 @@ public class WikivoyageDbHelper {
|
|||
private static final String ARTICLES_COL_CITY_ID = "city_id";
|
||||
private static final String ARTICLES_COL_ORIGINAL_ID = "original_id";
|
||||
private static final String ARTICLES_COL_LANG = "lang";
|
||||
private static final String ARTICLES_COL_AGGREGATED_PART_OF = "aggregated_part_of";
|
||||
|
||||
private static final String ARTICLES_TABLE_SELECT = "SELECT " +
|
||||
ARTICLES_COL_ID + ", " +
|
||||
|
@ -51,7 +52,8 @@ public class WikivoyageDbHelper {
|
|||
ARTICLES_COL_GPX_GZ + ", " +
|
||||
ARTICLES_COL_CITY_ID + ", " +
|
||||
ARTICLES_COL_ORIGINAL_ID + ", " +
|
||||
ARTICLES_COL_LANG +
|
||||
ARTICLES_COL_LANG + ", " +
|
||||
ARTICLES_COL_AGGREGATED_PART_OF +
|
||||
" FROM " + ARTICLES_TABLE_NAME;
|
||||
|
||||
private static final String SEARCH_TABLE_NAME = "wikivoyage_search";
|
||||
|
@ -210,6 +212,7 @@ public class WikivoyageDbHelper {
|
|||
res.cityId = cursor.getLong(8);
|
||||
res.originalId = cursor.getLong(9);
|
||||
res.lang = cursor.getString(10);
|
||||
res.aggregatedPartOf = cursor.getString(11);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue