替换规则添加超时时间

This commit is contained in:
kunfei
2022-05-05 23:02:28 +08:00
parent 048716b4ab
commit 13a83202d7
3 changed files with 1631 additions and 2 deletions
File diff suppressed because it is too large Load Diff
@@ -20,7 +20,7 @@ val appDb by lazy {
}
@Database(
version = 46,
version = 47,
exportSchema = true,
entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class,
ReplaceRule::class, SearchBook::class, SearchKeyword::class, Cookie::class,
@@ -30,7 +30,8 @@ val appDb by lazy {
autoMigrations = [
AutoMigration(from = 43, to = 44),
AutoMigration(from = 44, to = 45),
AutoMigration(from = 45, to = 46)
AutoMigration(from = 45, to = 46),
AutoMigration(from = 46, to = 47)
]
)
abstract class AppDatabase : RoomDatabase() {
@@ -43,6 +43,9 @@ data class ReplaceRule(
//是否正则
@ColumnInfo(defaultValue = "1")
var isRegex: Boolean = true,
//超时时间
@ColumnInfo(defaultValue = "3000")
var timeoutMillisecond: Long = 3000L,
//排序
@ColumnInfo(name = "sortOrder", defaultValue = "0")
var order: Int = 0