Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
result.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
5#pragma once
6
20#include <kcenon/common/patterns/result.h>
21
22namespace database {
23
24// =============================================================================
25// Primary types - imported from common_system
26// =============================================================================
27
29template<typename T>
30using Result = kcenon::common::Result<T>;
31
33using VoidResult = kcenon::common::VoidResult;
34
36using error_info = kcenon::common::error_info;
37
38// =============================================================================
39// Database-specific error codes
40// =============================================================================
41
43enum class error_code {
44 success = 0,
45 unknown_error = -1,
47 not_implemented = -3,
48 invalid_state = -4,
50 query_failed = -6,
51 timeout = -7
52};
53
54} // namespace database
55
56// =============================================================================
57// Integrated namespace for compatibility
58// =============================================================================
59
61 using database::Result;
65} // namespace database::integrated
kcenon::common::error_info error_info
Primary error type.
Definition result.h:36
error_code
Error codes for database operations.
Definition result.h:43
kcenon::common::Result< T > Result
Primary Result type - use this for all database operations.
Definition result.h:30
kcenon::common::VoidResult VoidResult
Primary VoidResult type - use this for void operations.
Definition result.h:33