SwatDB
schema.h
Go to the documentation of this file.
1 /*
2  * SwatDB
3  *
4  * @authors: See Contributors.doc for code contributors
5  *
6  * Copyright (c) 2020 Swarthmore College Computer Science Department
7  * Swarthmore PA, Professors Tia Newhall, Ameet Soni
8  */
9 
10 #pragma once
11 
16 #include <string>
17 #include <vector>
18 #include "swatdb_types.h"
19 
26 // TODO: not yet implemented, but need to create compile Catalog code
27 class Schema {
28 
29  public:
33  Schema(){}
34 
38  ~Schema(){}
39 
40  /*
41  Schema(std::vector<std::string> field_names, // name of each field
42  std::vector<FieldType> field_types, // type of each field
43  std::vetor<std::uint32_t> field_len_limits, // length of each field
44  std::vector<std::uint32_t> key_fields); // indicies into passed lists for key fields
45 
46  std::vector<std::uint_32> getKeyFields();
47  std::uint32_t getNumFields();
48  std::vector<FieldId> *getFieldIds();
49  std::vector<FieldType> *getFieldTypes();
50  std::vector<std::string> *getFieldNames();
51  std::vector<std::uint32_t> *getFieldLens();
52  */
53 
54  private:
55 
59  std::vector<FieldId> field_ids;
60 
64  std::vector<FieldType> field_types;
65 
69  std::vector<std::string> field_names;
70 
74  std::vector<std::uint32_t> field_len_max;
75 
79  std::vector<FieldId> key_fields;
80 
81 };
std::vector< std::string > field_names
Definition: schema.h:69
std::vector< FieldType > field_types
Definition: schema.h:64
Definition: schema.h:27
std::vector< FieldId > field_ids
Definition: schema.h:59
~Schema()
Destructor.
Definition: schema.h:38
std::vector< std::uint32_t > field_len_max
Definition: schema.h:74
std::vector< FieldId > key_fields
Definition: schema.h:79
Schema()
Constructor.
Definition: schema.h:33