Enum SqlInterfaceError

Source
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.

Fields

§location: String
§source: Error
§

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

Fields

§location: String
§source: Error
§

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.

Fields

§location: String
§query: String
§source: Error
§

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.

Fields

§location: String
§query: String
§source: Error
§

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

Fields

§location: String
§query: String
§profile_id: i32
§source: Error
§

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.

Fields

§location: String
§query: String
§source: Error
§

ScheduleProcessingFailure

Could not process the results obtained from the database.

Fields

§location: String
§

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.

Fields

§location: String
§query: String
§source: Error
§

InsertFeedEventFailure

Error occurred when trying to insert a feed event into the database.

Fields

§location: String
§source: Error
§

InsertRefillEventFailure

Error occurred when trying to insert a refill event into the database.

Fields

§location: String
§query: String
§source: Error
§

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

Fields

§location: String
§pump_id: i64
§current_datetime: NaiveDateTime
§last_dosing_datetime: NaiveDateTime
§

InsertBallingEventFailure

Error occurred when trying to insert a Balling dosing event into the database.

Fields

§location: String
§source: Error
§

RefillPastDataRetrievalFailed

Database request for retrieving the refill history failed.

Fields

§location: String
§category: String
§interval: String
§

FeedScheduleEntryRequestFailure

Could not get feed schedule entry from the database.

Fields

§location: String
§query: String
§source: Error
§

FeedScheduleEntryRepeatDailyOutOfRange

Could not convert feedschedule entry string(s) read from the database to timestamp.

Fields

§location: String
§repeat_daily: i16
§

FeedScheduleEntryTimeStampProcessingFailure

Error occurred when processing time stamp results from the database.

Fields

§location: String
§number_entries: usize
§

FeedScheduleUpdateFailure

Error occurred when trying to calculate update of feed schedule entry.

Fields

§location: String
§

FeedScheduleDropFailure

Error occurred when trying to drop a feed schedule entry from the database.

Fields

§location: String
§source: Error
§

DatabaseFeedPhaseDurationNegative(String, i16, i16)

§

SingleBallingSetValRequestFailure

Could not get a single Balling set value from the database.

Fields

§location: String
§query: String
§pump_id: i64
§source: Error
§

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.

Fields

§location: String
§query: String
§source: Error
§

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.

Fields

§location: String
§query: String
§source: Error
§

HeatingSetValsNoSingleResponse(String, String)

The database returned more than one heating set value entry.

§

HeatingSetValsUpdateFailure

Updating the heating set values failed.

Fields

§location: String
§

VentilationSetValsUpdateFailure

Updating the ventilation set values failed.

Fields

§location: String
§

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.

Fields

§location: String
§query: String
§source: Error
§

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.

Fields

§location: String
§

DateRequestFailure

Could not retrieve date from the database.

Fields

§location: String
§query: String
§

TimestampRequestFailure

Could not retrieve timestamp from the database.

Fields

§location: String
§query: String
§

OptionalTimestampRequestFailure

Could not retrieve optional timestamp from the database.

Fields

§location: String
§query: String
§

DatabasePingFailure

Could not ping database.

Fields

§location: String
§

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.

Fields

§location: String
§

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.

Fields

§location: String
§

DatabaseCheckScheduleFailure

Could not check schedule table for NULL values or number of rows.

Fields

§location: String
§

DatabaseCheckHeatingSetValsFailure

Could not check heating set value table for NULL values or number of rows.

Fields

§location: String
§

DatabaseCheckHeatingStatsFailure

Could not check heating stats table for NULL values or number of rows.

Fields

§location: String
§

DatabaseCheckVentilationSetValsFailure

Could not check ventilation set value table for NULL values or number of rows.

Fields

§location: String
§

DatabaseCheckRefillFailure

Could not check refill table for number of rows.

Fields

§location: String
§

DatabaseCheckFeedSetValsFailure

Could not check feed set value table for NULL values or number of rows.

Fields

§location: String
§table_name: String
§

DatabaseFeedTableNegativeValue(String, String, i64, i64)

A feed set value table may be inconsistent - invalid answer from database to query.

Trait Implementations§

Source§

impl Debug for SqlInterfaceError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SqlInterfaceError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SqlInterfaceError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T