blob: 9367701dc3a0c0d1f6abe0e473a55e09a201c6d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include <cstddef>
template <typename T>
struct Column
{
Column(T default_value):
value{default_value} {}
Column():
value{} {}
using real_type = T;
T value{};
};
struct Id: Column<std::size_t> {
static constexpr std::size_t unset_value = static_cast<std::size_t>(-1);
static constexpr auto name = "id_";
static constexpr auto options = "PRIMARY KEY";
Id(): Column<std::size_t>(unset_value) {}
};
|