#ifndef SQL_ERROR_CODE_HPP #define SQL_ERROR_CODE_HPP #include #include namespace matador::sql { enum class error_code : uint8_t { Ok = 0, InvalidQuery, UnknownTable, UnknownColumn, BindFailed, ExecuteFailed, FetchFailed, PrepareFailed, DescribeFailed, TableExistsFailed, RetrieveDataFailed, SequenceExistsFailed, ResetFailed, OpenError, CloseError, StatementLocked, Failure }; class sql_category_impl final : public std::error_category { public: [[nodiscard]] const char* name() const noexcept override; [[nodiscard]] std::string message(int ev) const override; }; const std::error_category& sql_category(); std::error_code make_error_code(error_code e); std::error_condition make_error_condition(error_code e); } template <> struct std::is_error_code_enum : true_type {}; #endif //SQL_ERROR_CODE_HPP