1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
table! { data (device_id, timestamp) { device_id -> Text, timestamp -> Timestamp, value -> Double, battery_status -> Double, } } table! { devices (device_id) { device_id -> Text, name -> Text, } } joinable!(data -> devices (device_id)); allow_tables_to_appear_in_same_query!(data, devices,);