1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Fernando Sahmkow
/**
* @file schema.h
* @brief Caller-supplied column layout used for typed row access.
*
* DBC and DB2 files record how wide each field is but never what it means:
* a four-byte field may be an integer, a float or an offset into the string
* block. Bind a Schema to a Table to get names and types.
*
* @example
* @code
* database::Schema schema("SpellName");
* schema.addId("ID").add("Name_lang", database::ColumnType::String);
*
* std::vector<std::string> issues;
* if (table.bind(schema, &issues)) {
* for (size_t i = 0; i < table.rowCount(); ++i) {
* auto row = table.row(i);
* printf("%u %s\n", row.id(), row.value("Name_lang").asString().data());
* }
* }
* @endcode
*/
namespace whiteout::database // namespace whiteout::database