aquarium_control/
database.rs

1/* Copyright 2024 Uwe Martin
2
3Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
5The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
7THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8*/
9
10/// Contains functions for execution of basic queries used by the other modules
11pub mod sql_interface;
12
13/// Contains functions for execution of all queries relevant for Balling mineral dosing
14pub mod sql_interface_balling;
15
16/// Contains functions for execution of all queries relevant for time-data recording (recorder)
17pub mod sql_interface_data;
18
19/// Contains functions for execution of all queries relevant for feed (food)
20pub mod sql_interface_feed;
21
22/// Contains functions for execution of all queries relevant for heating statistics (thermal)
23pub mod sql_interface_heating_stats;
24
25/// Contains functions for execution of all queries relevant for refill (water)
26pub mod sql_interface_refill;
27
28/// Contains functions for execution of all queries relevant for schedule (permission)
29pub mod sql_interface_schedule;
30
31/// Contains enum with error definitions
32pub mod sql_interface_error;
33
34/// Contains functions for execution of all queries relevant for calculating the time until midnight
35pub mod sql_interface_midnight;
36
37/// Contains all SQL queries as constants with placeholders
38pub mod sql_query_strings;
39
40/// Contains functions for execution of all queries relevant for heating set values (thermal)
41pub mod sql_interface_heating_setvals;
42
43/// Contains functions for execution of all queries relevant for ventilation set values (thermal)
44pub mod sql_interface_ventilation_setvals;
45
46/// Contains data structure for transfer of heating statistics to the database
47pub mod sql_interface_heating_stats_data_transfer;
48
49/// Configuration of SqlInterface
50pub mod sql_interface_config;
51
52/// Represents a component that can be "pinged" to keep a connection alive.
53pub mod pingable;
54
55/// Trait and implementation for database interface of Feed allowing mocking
56pub mod database_interface_feed_trait;
57
58/// Trait for updating of set values for either heating or ventilation control
59pub mod thermal_set_value_updater_trait;