|
Lightweight 0.20261105.1
|
#include "../../Api.hpp"#include "../../SqlError.hpp"#include <string_view>Go to the source code of this file.
Functions | |
| LIGHTWEIGHT_API std::string_view | Lightweight::Driver::Sqlite3::SqlStateFromResultCode (int extendedResultCode, std::string_view message) noexcept |
| The SQLSTATE of a SQLite failure. | |
| LIGHTWEIGHT_API SqlErrorInfo | Lightweight::Driver::Sqlite3::MakeErrorInfo (int extendedResultCode, std::string_view message) |
| The diagnostics of a SQLite failure. | |
The diagnostics of the SQLite3 driver: how a SQLite result code becomes a Lightweight::SqlErrorInfo.
SQLite reports a result code and a message, no SQLSTATE. The driver derives one from a descriptor table, so the library's error classification (SqlErrorDetection.hpp, the retry policies) answers for the native driver as it does for an ODBC driver: constraint violations land in class 23, a busy or locked database in the retryable 40001, a failed open in HY000.
Definition in file Diagnostics.hpp.
|
noexcept |
The SQLSTATE of a SQLite failure.
Looked up in a table ordered most specific first: a row matches the full extended result code, or only its primary code (the low 8 bits) where the row says so; the rows for SQLITE_ERROR also look for a fragment of SQLite's message ("no such table", "no such column", "already exists", "syntax error"), since SQLite reports those with no more specific code.
| extendedResultCode | The extended result code of the failure. |
| message | SQLite's message for it. |
"HY000" when no row matches. References Lightweight::Driver::Sqlite3::SqlStateFromResultCode().
Referenced by Lightweight::Driver::Sqlite3::SqlStateFromResultCode().
| LIGHTWEIGHT_API SqlErrorInfo Lightweight::Driver::Sqlite3::MakeErrorInfo | ( | int | extendedResultCode, |
| std::string_view | message | ||
| ) |
The diagnostics of a SQLite failure.
| extendedResultCode | The extended result code of the failure; it becomes the native error code. |
| message | SQLite's message for it, verbatim. |
SqlStateFromResultCode. References Lightweight::Driver::Sqlite3::MakeErrorInfo().
Referenced by Lightweight::Driver::Sqlite3::MakeErrorInfo().