10#include <userver/logging/log_extra.hpp>
12#include <userver/storages/postgres/postgres_fwd.hpp>
13#include <userver/storages/postgres/sql_state.hpp>
15USERVER_NAMESPACE_BEGIN
21 enum class Severity { kLog, kDebug, kInfo, kNotice, kWarning, kError, kFatal, kPanic };
23 explicit Message(detail::ResultWrapperPtr);
25 std::string GetMessage()
const;
26 std::string GetPrimary()
const;
27 std::string GetDetail()
const;
28 Severity GetSeverity()
const;
29 std::string GetSeverityString()
const;
32 std::string GetSchema()
const;
33 std::string GetTable()
const;
34 std::string GetColumn()
const;
35 std::string GetDatatype()
const;
36 std::string GetConstraint()
const;
38 logging::LogExtra GetLogExtra()
const;
43 static Severity SeverityFromString(std::string_view);
46 static constexpr const char*
kUnknown =
"<unknown>";
49 detail::ResultWrapperPtr res_;