mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Added SatItem and SatTrans relation to retrieve trans modes
This commit is contained in:
1 parent
de11eb98c0
commit
e8208b7934
3 files changed
+15
-18
No files matched your search
@@ -29,6 +29,7 @@ interface SatelliteDao {
|
||||
|
||||
// Query
|
||||
|
||||
@Transaction
|
||||
@Query("SELECT catNum, name, isSelected FROM entries ORDER BY name ASC")
|
||||
fun getAllSatItems(): Flow<List<SatItem>>
|
||||
|
||||
|
||||
@@ -17,4 +17,17 @@
|
||||
*/
|
||||
package com.rtbishop.look4sat.data.model
|
||||
|
||||
class SatItem(val catNum: Int, val name: String, var isSelected: Boolean)
|
||||
import androidx.room.Relation
|
||||
|
||||
data class SatItem(
|
||||
val catNum: Int,
|
||||
val name: String,
|
||||
var isSelected: Boolean,
|
||||
@Relation(
|
||||
parentColumn = "catNum",
|
||||
entity = SatTrans::class,
|
||||
entityColumn = "catNum",
|
||||
projection = ["mode"]
|
||||
)
|
||||
val modes: List<String>
|
||||
)
|
||||
@@ -1,20 +1,3 @@
|
||||
/*
|
||||
* Look4Sat. Amateur radio satellite tracker and pass predictor.
|
||||
* Copyright (C) 2019-2021 Arty Bishop (bishop.arty@gmail.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*
|
||||
* Look4Sat. Amateur radio satellite tracker and pass predictor.
|
||||
* Copyright (C) 2019-2021 Arty Bishop (bishop.arty@gmail.com)
|
||||
|
||||
Reference in new issue
Block a user