mirror of
https://github.com/gedoor/legado.git
synced 2024-07-04 23:36:56 +08:00
优化
This commit is contained in:
parent
5b1e4b6bf6
commit
ad3a1eec4d
|
@ -2,7 +2,7 @@
|
|||
"formatVersion": 1,
|
||||
"database": {
|
||||
"version": 60,
|
||||
"identityHash": "a1c0854a62819a02546c82a1d60ac1b8",
|
||||
"identityHash": "19e1f66252eb41afc0990f202fe4527a",
|
||||
"entities": [
|
||||
{
|
||||
"tableName": "books",
|
||||
|
@ -1689,7 +1689,7 @@
|
|||
},
|
||||
{
|
||||
"tableName": "dictRules",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `urlRule` TEXT NOT NULL, `showRule` TEXT NOT NULL, PRIMARY KEY(`name`))",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `urlRule` TEXT NOT NULL, `showRule` TEXT NOT NULL, `enabled` INTEGER NOT NULL, PRIMARY KEY(`name`))",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "name",
|
||||
|
@ -1708,6 +1708,12 @@
|
|||
"columnName": "showRule",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "enabled",
|
||||
"columnName": "enabled",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
|
@ -1766,7 +1772,7 @@
|
|||
"views": [],
|
||||
"setupQueries": [
|
||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a1c0854a62819a02546c82a1d60ac1b8')"
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '19e1f66252eb41afc0990f202fe4527a')"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -12,6 +12,9 @@ interface DictRuleDao {
|
|||
@get:Query("select * from dictRules")
|
||||
val all: List<DictRule>
|
||||
|
||||
@get:Query("select * from dictRules where enabled = 1")
|
||||
val enabled: List<DictRule>
|
||||
|
||||
@Upsert
|
||||
fun upsert(vararg dictRule: DictRule)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import androidx.room.PrimaryKey
|
|||
data class DictRule(
|
||||
@PrimaryKey
|
||||
val name: String,
|
||||
val urlRule: String,
|
||||
val showRule: String
|
||||
var urlRule: String,
|
||||
var showRule: String,
|
||||
var enabled: Boolean
|
||||
)
|
Loading…
Reference in New Issue
Block a user