Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
database_types.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
12#include <cstdint>
13
14namespace database
15{
23 enum class database_types : uint8_t {
27 none = 0,
28
32 postgres = 1,
33
37 sqlite = 3,
38
42 oracle = 4,
43
47 mongodb = 5,
48
52 redis = 6
53 };
54
60 constexpr const char* to_string(database_types type) noexcept
61 {
62 switch (type) {
63 case database_types::none: return "none";
64 case database_types::postgres: return "postgres";
65 case database_types::sqlite: return "sqlite";
66 case database_types::oracle: return "oracle";
67 case database_types::mongodb: return "mongodb";
68 case database_types::redis: return "redis";
69 default: return "unknown";
70 }
71 }
72} // namespace database
database_types
Represents various database backends or modes.
@ none
No specific database type is set.
@ mongodb
Indicates a MongoDB database (future implementation).
@ sqlite
Indicates a SQLite database.
@ redis
Indicates a Redis database (future implementation).
@ oracle
Indicates an Oracle database (future implementation).
@ postgres
Indicates a PostgreSQL database.
constexpr const char * to_string(database_types type) noexcept
Converts database_types enum to string representation.