Specialized ConnectionError for PostgreSQL with detailed error information.
More...
#include <relx/connection/postgresql_errors.hpp>
Specialized ConnectionError for PostgreSQL with detailed error information.
Definition at line 36 of file postgresql_errors.hpp.
◆ formatted_message()
| std::string relx::connection::PostgreSQLError::formatted_message |
( |
| ) |
const |
Get a user-friendly error message.
- Returns
- A formatted error message with details
◆ from_libpq()
| static PostgreSQLError relx::connection::PostgreSQLError::from_libpq |
( |
int |
pg_error_code, |
|
|
std::string_view |
error_msg |
|
) |
| |
|
static |
Create an error from a libpq error code and message.
- Parameters
-
| pg_error_code | The PostgreSQL error code |
| error_msg | The error message |
◆ from_sql_state()
| static PostgreSQLError relx::connection::PostgreSQLError::from_sql_state |
( |
std::string_view |
sql_state, |
|
|
std::string_view |
error_msg |
|
) |
| |
|
static |
Create an error from a SQLSTATE code.
- Parameters
-
| sql_state | The SQLSTATE code |
| error_msg | The error message |
◆ is_check_constraint_violation()
| bool relx::connection::PostgreSQLError::is_check_constraint_violation |
( |
| ) |
const |
|
inline |
Check if this is a check constraint violation.
- Returns
- True if this is a check constraint violation
Definition at line 72 of file postgresql_errors.hpp.
◆ is_duplicate_key_error()
| bool relx::connection::PostgreSQLError::is_duplicate_key_error |
( |
| ) |
const |
|
inline |
Check if this is a duplicate key error.
- Returns
- True if this is a duplicate key error
Definition at line 62 of file postgresql_errors.hpp.
◆ is_foreign_key_violation()
| bool relx::connection::PostgreSQLError::is_foreign_key_violation |
( |
| ) |
const |
|
inline |
Check if this is a foreign key violation.
- Returns
- True if this is a foreign key violation
Definition at line 66 of file postgresql_errors.hpp.
◆ is_not_null_violation()
| bool relx::connection::PostgreSQLError::is_not_null_violation |
( |
| ) |
const |
|
inline |
Check if this is a not-null violation.
- Returns
- True if this is a not-null violation
Definition at line 78 of file postgresql_errors.hpp.
◆ column_name
| std::string relx::connection::PostgreSQLError::column_name |
◆ constraint_name
| std::string relx::connection::PostgreSQLError::constraint_name |
◆ detail
| std::string relx::connection::PostgreSQLError::detail |
◆ error_code
◆ hint
| std::string relx::connection::PostgreSQLError::hint |
◆ message
| std::string relx::connection::PostgreSQLError::message |
◆ sql_state
| std::string relx::connection::PostgreSQLError::sql_state |
◆ table_name
| std::string relx::connection::PostgreSQLError::table_name |
The documentation for this struct was generated from the following file: