pub enum SqlInterfaceError {
Show 92 variants
ConnectionFromPool {
location: String,
source: Error,
},
WaitTimeoutTooLow(String, u64, u64),
WaitTimeoutInvalid(String, i64),
ConnectionPoolFailure {
location: String,
url: String,
source: Error,
},
RequiredTablesNotExisting(String, String, String),
ShowTablesWithoutProperResult(String),
SingleVersionRequestFailure(String, String, i32, i32, i32),
SingleVersionRequestNotListed(String, String, i32, i32, i32),
SingleVersionRequestMultipleResults(String, String, i32, i32, i32),
SingleStringRequestFailure {
location: String,
query: String,
source: Error,
},
SingleStringRequestNoSingleResponse(String, String),
SingleStringRequestEmptyResponse(String, String),
MultipleStringRequestEmptyResponse(String, String),
MultipleStringRequestSingleResponse(String, String),
SingleIntegerRequestFailure(String, String),
SingleIntegerRequestNoSingleResponse(String, String),
SingleFloatRequestFailure(String, String),
SingleFloatRequestEmptyResponse(String, String),
SingleFloatRequestNoSingleResponse(String, String),
SingleHeatingStatsRequestFailure {
location: String,
query: String,
source: Error,
},
SingleHeatingStatsRequestEmptyResponse(String, String),
SingleHeatingStatsRequestNoSingleResponse(String, String),
SingleFeedpatternRequestFailure {
location: String,
query: String,
profile_id: i32,
source: Error,
},
SingleFeedpatternRequestEmptyResponse(String, String, i32),
SingleFeedpatternRequestNoSingleResponse(String, String, i32),
ScheduleRequestFailure {
location: String,
query: String,
source: Error,
},
ScheduleProcessingFailure {
location: String,
source: Box<SqlInterfaceError>,
},
ScheduleTypeConversionFailure(String, String),
ScheduleTypeNotFound(String, String, String),
InsertHeatingStatsEntryFailure {
location: String,
query: String,
source: Error,
},
InsertFeedEventFailure {
location: String,
source: Error,
},
InsertRefillEventFailure {
location: String,
query: String,
source: Error,
},
BallingDosingLogEntryInFuture(String, i64, NaiveDateTime),
BallingDosingTimestampConversionFailure {
location: String,
pump_id: i64,
current_datetime: NaiveDateTime,
last_dosing_datetime: NaiveDateTime,
source: OutOfRangeError,
},
InsertBallingEventFailure {
location: String,
source: Error,
},
RefillPastDataRetrievalFailed {
location: String,
category: String,
interval: String,
source: Box<SqlInterfaceError>,
},
FeedScheduleEntryRequestFailure {
location: String,
query: String,
source: Error,
},
FeedScheduleEntryRepeatDailyOutOfRange {
location: String,
repeat_daily: i16,
},
FeedScheduleEntryTimeStampProcessingFailure {
location: String,
number_entries: usize,
source: Box<SqlInterfaceError>,
},
FeedScheduleUpdateFailure {
location: String,
source: Box<SqlInterfaceError>,
},
FeedScheduleDropFailure {
location: String,
source: Error,
},
DatabaseFeedPhaseDurationNegative(String, i16, i16),
SingleBallingSetValRequestFailure {
location: String,
query: String,
pump_id: i64,
source: Error,
},
SingleBallingSetValEmptyResponse(String, String, i64),
SingleBallingSetValNoSingleResponse(String, String, i64),
InsertDataFrameFailure {
location: String,
query: String,
source: Error,
},
NegativeTimeDeltaSeconds(String, i64),
NegativeInteger(String, i64),
HeatingSetValsRequestFailure {
location: String,
query: String,
source: Error,
},
HeatingSetValsNoSingleResponse(String, String),
HeatingSetValsUpdateFailure {
location: String,
source: Box<SqlInterfaceError>,
},
VentilationSetValsUpdateFailure {
location: String,
source: Box<SqlInterfaceError>,
},
HeatingSetValsInvalid(String, f32, f32),
VentilationSetValsRequestFailure {
location: String,
query: String,
source: Error,
},
VentilationSetValsNoSingleResponse(String, String),
VentilationSetValsInvalid(String, f32, f32),
DatabaseNameRequestFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DateRequestFailure {
location: String,
query: String,
},
TimestampRequestFailure {
location: String,
query: String,
},
OptionalTimestampRequestFailure {
location: String,
query: String,
},
DatabasePingFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseBallingSetValTableContainsNull(String, i64),
DatabaseBallingSetValTableNegativeValue(String, i64, i64, i64),
DatabaseBallingSetValTableContainsTooManyRows(String, u64, u64),
DatabaseBallingDosingLogTableContainsTooManyRows(String, u64, u64),
DatabaseScheduleTableContainsNull(String, i64),
DatabaseScheduleTableNegativeValue(String, i64, i64),
DatabaseScheduleTableContainsTooManyRows(String, u64, u64),
DatabaseCheckDataFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseDataTableNegativeValue(String, i64),
DatabaseDataTableContainsTooManyRows(String, u64, u64),
DatabaseHeatingSetValTableContainsNull(String, i64),
DatabaseHeatingSetValTableNegativeValue(String, i64, i64),
DatabaseHeatingSetValTableContainsTooManyRows(String, u64),
DatabaseHeatingStatsTableContainsNull(String, i64),
DatabaseHeatingStatsTableNegativeValue(String, i64, i64),
DatabaseHeatingStatsTableContainsTooManyRows(String, u64, u64),
DatabaseVentilationSetValTableContainsNull(String, i64),
DatabaseVentilationSetValTableNegativeValue(String, i64, i64),
DatabaseVentilationSetValTableContainsTooManyRows(String, u64),
DatabaseRefillTableNegativeValue(String, i64),
DatabaseRefillTableContainsTooManyRows(String, u64, u64),
DatabaseFeedSetValTableContainsNull(String, String, i64),
DatabaseFeedTableContainsTooManyRows(String, String, u64, u64),
DatabaseCheckBallingSetValsFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckScheduleFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckHeatingSetValsFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckHeatingStatsFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckVentilationSetValsFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckRefillFailure {
location: String,
source: Box<SqlInterfaceError>,
},
DatabaseCheckFeedSetValsFailure {
location: String,
table_name: String,
source: Box<SqlInterfaceError>,
},
DatabaseFeedTableNegativeValue(String, String, i64, i64),
}Expand description
Enum codifies the errors which the program may encounter in communication with the DB
Variants§
ConnectionFromPool
Could not get a connection from the pool. The database may be down or the pool exhausted.
WaitTimeoutTooLow(String, u64, u64)
The database wait_timeout is less than the required minimum.
WaitTimeoutInvalid(String, i64)
Could not parse wait_timeout value from the database
ConnectionPoolFailure
Could not establish database connection pool
RequiredTablesNotExisting(String, String, String)
Required tables are not existing in the database.
ShowTablesWithoutProperResult(String)
Error when reading tables from the database, expected more than one result.
SingleVersionRequestFailure(String, String, i32, i32, i32)
Could not get a single string from the database.
SingleVersionRequestNotListed(String, String, i32, i32, i32)
Database responded with empty response.
SingleVersionRequestMultipleResults(String, String, i32, i32, i32)
The database responded with multiple responses to request.
SingleStringRequestFailure
Could not get a string array from the database.
SingleStringRequestNoSingleResponse(String, String)
database responded with multiple responses to request.
SingleStringRequestEmptyResponse(String, String)
database responded with empty response to request.
MultipleStringRequestEmptyResponse(String, String)
database responded with empty response.
MultipleStringRequestSingleResponse(String, String)
The database responded with single row response.
SingleIntegerRequestFailure(String, String)
Could not get a single integer from the database.
SingleIntegerRequestNoSingleResponse(String, String)
The database responded with multiple responses.
SingleFloatRequestFailure(String, String)
Could not get a single float value from the database.
SingleFloatRequestEmptyResponse(String, String)
database responded with empty response.
SingleFloatRequestNoSingleResponse(String, String)
database responded with multiple responses to request.
SingleHeatingStatsRequestFailure
Could not get single heating stats entry from the database.
SingleHeatingStatsRequestEmptyResponse(String, String)
database responded with empty response.
SingleHeatingStatsRequestNoSingleResponse(String, String)
database responded with multiple responses to request.
SingleFeedpatternRequestFailure
Could not get feed pattern header from the database
SingleFeedpatternRequestEmptyResponse(String, String, i32)
database responded with empty response.
SingleFeedpatternRequestNoSingleResponse(String, String, i32)
The database responded with multiple responses.
ScheduleRequestFailure
Could not get schedule entries from the database.
ScheduleProcessingFailure
Could not process the results obtained from the database.
ScheduleTypeConversionFailure(String, String)
Error in conversion of the database result to schedule entry.
ScheduleTypeNotFound(String, String, String)
Type-specific schedule could not be found in the database.
InsertHeatingStatsEntryFailure
Error when inserting heating stats into the database.
InsertFeedEventFailure
Error occurred when trying to insert a feed event into the database.
InsertRefillEventFailure
Error occurred when trying to insert a refill event into the database.
BallingDosingLogEntryInFuture(String, i64, NaiveDateTime)
The Database contains log entry which is in the future.
BallingDosingTimestampConversionFailure
Error occurred when trying to calculate duration from two NaiveDateTime timestamps
InsertBallingEventFailure
Error occurred when trying to insert a Balling dosing event into the database.
RefillPastDataRetrievalFailed
Database request for retrieving the refill history failed.
FeedScheduleEntryRequestFailure
Could not get feed schedule entry from the database.
FeedScheduleEntryRepeatDailyOutOfRange
Could not convert feedschedule entry string(s) read from the database to timestamp.
FeedScheduleEntryTimeStampProcessingFailure
Error occurred when processing time stamp results from the database.
FeedScheduleUpdateFailure
Error occurred when trying to calculate update of feed schedule entry.
FeedScheduleDropFailure
Error occurred when trying to drop a feed schedule entry from the database.
DatabaseFeedPhaseDurationNegative(String, i16, i16)
SingleBallingSetValRequestFailure
Could not get a single Balling set value from the database.
SingleBallingSetValEmptyResponse(String, String, i64)
database responded with empty response.
SingleBallingSetValNoSingleResponse(String, String, i64)
The database responded with multiple responses.
InsertDataFrameFailure
Error occurred when inserting data frame into the database.
NegativeTimeDeltaSeconds(String, i64)
The database responded with a timestamp in the future.
NegativeInteger(String, i64)
The database responded with a negative value ({0}) where a positive value was expected
HeatingSetValsRequestFailure
Could not get heating set values from the database.
HeatingSetValsNoSingleResponse(String, String)
The database returned more than one heating set value entry.
HeatingSetValsUpdateFailure
Updating the heating set values failed.
VentilationSetValsUpdateFailure
Updating the ventilation set values failed.
HeatingSetValsInvalid(String, f32, f32)
The heating switch on temperature is higher than the heating switch-off temperature.
VentilationSetValsRequestFailure
Could not get ventilation set values from the database.
VentilationSetValsNoSingleResponse(String, String)
The database returned more than one ventilation set value entry.
VentilationSetValsInvalid(String, f32, f32)
The ventilation switch on temperature is lower than the ventilation switch-off temperature.
DatabaseNameRequestFailure
Could not retrieve database name.
DateRequestFailure
Could not retrieve date from the database.
TimestampRequestFailure
Could not retrieve timestamp from the database.
OptionalTimestampRequestFailure
Could not retrieve optional timestamp from the database.
DatabasePingFailure
Could not ping database.
DatabaseBallingSetValTableContainsNull(String, i64)
Balling set value table may be inconsistent - it contains NULL values.
DatabaseBallingSetValTableNegativeValue(String, i64, i64, i64)
Balling set value table may be inconsistent - invalid answer from database to query.
DatabaseBallingSetValTableContainsTooManyRows(String, u64, u64)
Balling set value table contains too many rows.
DatabaseBallingDosingLogTableContainsTooManyRows(String, u64, u64)
Balling dosing log table contains too many rows.
DatabaseScheduleTableContainsNull(String, i64)
Schedule table may be inconsistent - it contains NULL values.
DatabaseScheduleTableNegativeValue(String, i64, i64)
Schedule table may be inconsistent - invalid answer from database to query.
DatabaseScheduleTableContainsTooManyRows(String, u64, u64)
The schedule table contains too many rows.
DatabaseCheckDataFailure
Data table may be inconsistent - invalid answer from database to query.
DatabaseDataTableNegativeValue(String, i64)
Data table may be inconsistent - invalid answer from database to query.
DatabaseDataTableContainsTooManyRows(String, u64, u64)
The data table contains too many rows.
DatabaseHeatingSetValTableContainsNull(String, i64)
Heating set value table may be inconsistent - it contains NULL values.
DatabaseHeatingSetValTableNegativeValue(String, i64, i64)
Heating set value table may be inconsistent - invalid answer from database to query.
DatabaseHeatingSetValTableContainsTooManyRows(String, u64)
Heating set value table contains too many rows.
DatabaseHeatingStatsTableContainsNull(String, i64)
Heating stats table may be inconsistent - it contains NULL values.
DatabaseHeatingStatsTableNegativeValue(String, i64, i64)
Heating statistics table may be inconsistent - invalid answer from database to query.
DatabaseHeatingStatsTableContainsTooManyRows(String, u64, u64)
Heating stats table contains too many rows.
DatabaseVentilationSetValTableContainsNull(String, i64)
Ventilation set value table may be inconsistent - it contains NULL values.
DatabaseVentilationSetValTableNegativeValue(String, i64, i64)
Ventilation set value table may be inconsistent - invalid answer from database to query.
DatabaseVentilationSetValTableContainsTooManyRows(String, u64)
Ventilation set value table contains too many rows.
DatabaseRefillTableNegativeValue(String, i64)
Refill table may be inconsistent - invalid answer from database to query.
DatabaseRefillTableContainsTooManyRows(String, u64, u64)
Refill table contains too many rows.
DatabaseFeedSetValTableContainsNull(String, String, i64)
Feed set value table may be inconsistent - it contains NULL values.
DatabaseFeedTableContainsTooManyRows(String, String, u64, u64)
Feed set value table contains too many rows.
DatabaseCheckBallingSetValsFailure
Could not check balling set value table for NULL values or number of rows.
DatabaseCheckScheduleFailure
Could not check schedule table for NULL values or number of rows.
DatabaseCheckHeatingSetValsFailure
Could not check heating set value table for NULL values or number of rows.
DatabaseCheckHeatingStatsFailure
Could not check heating stats table for NULL values or number of rows.
DatabaseCheckVentilationSetValsFailure
Could not check ventilation set value table for NULL values or number of rows.
DatabaseCheckRefillFailure
Could not check refill table for number of rows.
DatabaseCheckFeedSetValsFailure
Could not check feed set value table for NULL values or number of rows.
DatabaseFeedTableNegativeValue(String, String, i64, i64)
A feed set value table may be inconsistent - invalid answer from database to query.