-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommonTypes.hpp
More file actions
31 lines (26 loc) · 929 Bytes
/
CommonTypes.hpp
File metadata and controls
31 lines (26 loc) · 929 Bytes
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
#pragma once
#include <vector>
#include <unordered_map>
#include <memory>
// forwards
class Constraint;
class Column;
class Row;
class Table;
class Database;
class Value;
class Command;
using ConstraintPtr = std::shared_ptr<Constraint>;
using ColumnPtr = std::shared_ptr<Column>;
using TablePtr = std::shared_ptr<Table>;
using CommandPtr = std::shared_ptr<Command>;
using ConstraintList = std::vector<ConstraintPtr>;
using TableList = std::vector<TablePtr>;
// no pointers because typically used by one container, lifetime tied to a table's lifetime
using ColumnList = std::vector<Column>;
using RowList = std::vector<Row>;
using ColumnMap = std::unordered_map<std::string, Column>;
using TableMap = std::unordered_map<std::string, Table>;
using TablePtrMap = std::unordered_map<std::string, TablePtr>;
using DatabaseMap = std::unordered_map<std::string, Database>;
using ValueMap = std::unordered_map<std::string, Value>;