give up on roomdb
i have a headache now, thanks Signed-off-by: androidacy-user <opensource@androidacy.com>pull/27/head
parent
606ff7d778
commit
7865b62255
@ -1,31 +0,0 @@
|
|||||||
package com.fox2code.mmm.utils.db;
|
|
||||||
|
|
||||||
import androidx.room.ColumnInfo;
|
|
||||||
import androidx.room.PrimaryKey;
|
|
||||||
import androidx.room.RoomDatabase;
|
|
||||||
|
|
||||||
import java.math.BigInteger;
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public abstract class ModuleCache extends RoomDatabase {
|
|
||||||
// table name
|
|
||||||
public static final String TABLE_NAME = "ModuleCache";
|
|
||||||
@PrimaryKey
|
|
||||||
public String id;
|
|
||||||
@ColumnInfo(name = "name")
|
|
||||||
public String name;
|
|
||||||
@ColumnInfo(name = "description")
|
|
||||||
public String description;
|
|
||||||
// next up is installed version (null if not installed), remote version (null if not found), and repo id (local if installed)
|
|
||||||
@ColumnInfo(name = "installed_version")
|
|
||||||
public BigInteger installedVersion;
|
|
||||||
@ColumnInfo(name = "remote_version")
|
|
||||||
public BigInteger remoteVersion;
|
|
||||||
@ColumnInfo(name = "repo_id")
|
|
||||||
public String repoId;
|
|
||||||
|
|
||||||
// db structure is: internal name, pretty name, repo url, enabled
|
|
||||||
// create the database
|
|
||||||
public abstract <ModuleDao> ModuleDao moduleDao();
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.fox2code.mmm.utils.db;
|
|
||||||
|
|
||||||
import androidx.room.ColumnInfo;
|
|
||||||
import androidx.room.Entity;
|
|
||||||
import androidx.room.PrimaryKey;
|
|
||||||
import androidx.room.RoomDatabase;
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
@Entity(tableName = "repos")
|
|
||||||
public abstract class RepoList extends RoomDatabase {
|
|
||||||
public static final String TABLE_NAME = "RepoList";
|
|
||||||
@PrimaryKey
|
|
||||||
public String id;
|
|
||||||
@ColumnInfo(name = "name")
|
|
||||||
public String name;
|
|
||||||
@ColumnInfo(name = "url")
|
|
||||||
public String url;
|
|
||||||
@ColumnInfo(name = "enabled")
|
|
||||||
public boolean enabled;
|
|
||||||
|
|
||||||
// db structure is: internal name, pretty name, repo url, enabled
|
|
||||||
// create the database
|
|
||||||
// dao object
|
|
||||||
public abstract <RepoDao> RepoDao repoDao();
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue