Module database

Source
Expand description

This is the container module for the database communication. Communicating with the SQL database includes preparing SQL queries, executing the queries and processing of query results.

Modules§

database_interface_feed_trait
Trait and implementation for database interface of Feed allowing mocking Defines the database interaction contract for the feed module.
pingable
Represents a component that can be “pinged” to keep a connection alive. Defines a contract for components that permanently use a database connection.
sql_interface
Contains functions for execution of basic queries used by the other modules Provides the core SQL database interface and connection management for the application.
sql_interface_balling
Contains functions for execution of all queries relevant for Balling mineral dosing Manages all database interactions for the Balling dosing system.
sql_interface_config
Configuration of SqlInterface Defines the configuration structure for the application’s SQL database interface.
sql_interface_data
Contains functions for execution of all queries relevant for time-data recording (recorder) Manages all database interactions for time-series sensor and state data.
sql_interface_error
Contains enum with error definitions Defines the custom error type for all database-related operations.
sql_interface_feed
Contains functions for execution of all queries relevant for feed (food) Manages all database interactions for the automated feeding system.
sql_interface_heating_setvals
Contains functions for execution of all queries relevant for heating set values (thermal) Manages database interactions for the heating system’s user-configurable set points.
sql_interface_heating_stats
Contains functions for execution of all queries relevant for heating statistics (thermal) Manages the aggregation and persistence of daily heating statistics.
sql_interface_heating_stats_data_transfer
Contains data structure for transfer of heating statistics to the database Provides the concrete implementation for transferring heating statistics to a SQL database.
sql_interface_midnight
Contains functions for execution of all queries relevant for calculating the time until midnight Provides a trait and implementation for calculating the time until midnight using the database clock.
sql_interface_refill
Contains functions for execution of all queries relevant for refill (water) Manages all database interactions for the automated water refill system.
sql_interface_schedule
Contains functions for execution of all queries relevant for schedule (permission) Manages time-based scheduling for various application modules.
sql_interface_ventilation_setvals
Contains functions for execution of all queries relevant for ventilation set values (thermal) Manages database interactions for the ventilation system’s user-configurable set points.
sql_query_strings
Contains all SQL queries as constants with placeholders A centralized repository for all static SQL query strings used throughout the application.
thermal_set_value_updater_trait
Trait for updating of set values for either heating or ventilation control Defines a generic trait for updating thermal set points from a data source.