mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
perf: add node list indicies (#4056)
This commit is contained in:
parent
d5475a0e0a
commit
3177609620
3 changed files with 907 additions and 2 deletions
|
|
@ -84,8 +84,9 @@ import org.meshtastic.core.database.entity.TracerouteNodePositionEntity
|
|||
AutoMigration(from = 23, to = 24),
|
||||
AutoMigration(from = 24, to = 25),
|
||||
AutoMigration(from = 25, to = 26),
|
||||
AutoMigration(from = 26, to = 27),
|
||||
],
|
||||
version = 26,
|
||||
version = 27,
|
||||
exportSchema = true,
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
|
|
|
|||
|
|
@ -96,7 +96,18 @@ data class MetadataEntity(
|
|||
)
|
||||
|
||||
@Suppress("MagicNumber")
|
||||
@Entity(tableName = "nodes")
|
||||
@Entity(
|
||||
tableName = "nodes",
|
||||
indices =
|
||||
[
|
||||
Index(value = ["last_heard"]),
|
||||
Index(value = ["short_name"]),
|
||||
Index(value = ["long_name"]),
|
||||
Index(value = ["hops_away"]),
|
||||
Index(value = ["is_favorite"]),
|
||||
Index(value = ["last_heard", "is_favorite"]),
|
||||
],
|
||||
)
|
||||
data class NodeEntity(
|
||||
@PrimaryKey(autoGenerate = false) val num: Int, // This is immutable, and used as a key
|
||||
@ColumnInfo(typeAffinity = ColumnInfo.BLOB) var user: MeshProtos.User = MeshProtos.User.getDefaultInstance(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue