#include "sql/sqlite_result_code.h"
#include <cstddef>
#include <ostream>
#include <ranges>
#include <set>
#include <string>
#include <string_view>
#include "base/check.h"
#include "base/check_op.h"
#include "base/dcheck_is_on.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/ranges/algorithm.h"
#include "sql/sqlite_result_code_values.h"
#include "third_party/sqlite/sqlite3.h"
namespace sql {
namespace {
struct SqliteResultCodeMappingEntry { … };
constexpr SqliteResultCodeMappingEntry kResultCodeMapping[] = …;
SqliteResultCodeMappingEntry FindResultCode(int sqlite_result_code) { … }
}
#if DCHECK_IS_ON()
SqliteResultCode ToSqliteResultCode(int sqlite_result_code) { … }
SqliteErrorCode ToSqliteErrorCode(SqliteResultCode sqlite_error_code) { … }
#endif
bool IsSqliteSuccessCode(SqliteResultCode sqlite_result_code) { … }
SqliteLoggedResultCode ToSqliteLoggedResultCode(int sqlite_result_code) { … }
void UmaHistogramSqliteResult(const std::string& histogram_name,
int sqlite_result_code) { … }
std::ostream& operator<<(std::ostream& os,
SqliteResultCode sqlite_result_code) { … }
std::ostream& operator<<(std::ostream& os, SqliteErrorCode sqlite_error_code) { … }
void CheckSqliteLoggedResultCodeForTesting() { … }
}