Add relay view to faster load controller_uid
This commit is contained in:
parent
277b159200
commit
d4ff664f74
16 changed files with 146 additions and 81 deletions
|
@ -50,8 +50,8 @@ impl DbJunctionRelaySchedule {
|
|||
) -> Result<Vec<DbRelay>, DatabaseError> {
|
||||
sqlx::query_as!(
|
||||
DbRelay,
|
||||
r#"SELECT relays.* FROM relays INNER JOIN junction_relay_schedule
|
||||
ON junction_relay_schedule.relay_id = relays.id
|
||||
r#"SELECT v_relays.* FROM v_relays INNER JOIN junction_relay_schedule
|
||||
ON junction_relay_schedule.relay_id = v_relays.id
|
||||
WHERE junction_relay_schedule.schedule_id = ?
|
||||
ORDER BY junction_relay_schedule.weekday"#,
|
||||
schedule.id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue