Lightweight 0.1.0
Loading...
Searching...
No Matches
SqlColumnTypeDefinitions.hpp
1// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include <variant>
6
7namespace SqlColumnTypeDefinitions
8{
9
10// clang-format off
11struct Bigint {};
12struct Binary { std::size_t size = 255; };
13struct Bool {};
14struct Char { std::size_t size = 1; };
15struct Date {};
16struct DateTime {};
17struct Decimal { std::size_t precision {}; std::size_t scale {}; };
18struct Guid {};
19struct Integer {};
20struct NChar { std::size_t size = 1; };
21struct NVarchar { std::size_t size = 255; };
22struct Real {};
23struct Smallint {};
24struct Text { std::size_t size {}; };
25struct Time {};
26struct Timestamp {};
27struct Tinyint {};
28struct VarBinary { std::size_t size = 255; };
29struct Varchar { std::size_t size = 255; };
30// clang-format on
31
32} // namespace SqlColumnTypeDefinitions
33
34using SqlColumnTypeDefinition = std::variant<SqlColumnTypeDefinitions::Bigint,
35 SqlColumnTypeDefinitions::Binary,
36 SqlColumnTypeDefinitions::Bool,
37 SqlColumnTypeDefinitions::Char,
38 SqlColumnTypeDefinitions::Date,
39 SqlColumnTypeDefinitions::DateTime,
40 SqlColumnTypeDefinitions::Decimal,
41 SqlColumnTypeDefinitions::Guid,
42 SqlColumnTypeDefinitions::Integer,
43 SqlColumnTypeDefinitions::NChar,
44 SqlColumnTypeDefinitions::NVarchar,
45 SqlColumnTypeDefinitions::Real,
46 SqlColumnTypeDefinitions::Tinyint,
47 SqlColumnTypeDefinitions::Smallint,
48 SqlColumnTypeDefinitions::Text,
49 SqlColumnTypeDefinitions::Time,
50 SqlColumnTypeDefinitions::Timestamp,
51 SqlColumnTypeDefinitions::VarBinary,
52 SqlColumnTypeDefinitions::Varchar>;