-
Notifications
You must be signed in to change notification settings - Fork 1
/
data_str.hh
42 lines (36 loc) · 1.15 KB
/
data_str.hh
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
// PICTORIAL REPRESENTATION OF A TABLE
// -----------------------------------
// Columns
// ^
// ___________|____________
// / \ // for multiline comment warning
// Table -> Col1 Col2 Col3 ... Coln
// | | | |
// v v v v
// Val1 Val1 Val1 ... Val1 \ // for multiline comment warning
// Val2 Val2 Val2 ... Val2 |
// Val3 Val3 Val3 ... Val3 |
// . . . . -->Attribute
// . . . . |
// . . . . |
// Valm Valm Valm ... Valm /
//
// NOTE: Indexing is from 1->n in diagram, and 0->(n-1) in the program.
// ----
#ifndef _data_str_included_
#define _data_str_included_
#include <vector>
#include <iostream>
using namespace std;
struct attribute {
string name, type;
vector < string > values;
};
struct table {
string name;
vector < attribute > columns;
};
extern vector < table > dollar;
extern vector < table > list_table;
extern vector < string > broken_query;
#endif