42 lines
1.2 KiB
C++
Executable file
42 lines
1.2 KiB
C++
Executable file
#pragma once
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include "Relation.h"
|
|
|
|
//still in progress
|
|
class DBEngine{
|
|
vector<Relation> tables;
|
|
vector<string> commands;
|
|
int size;
|
|
|
|
public:
|
|
DBEngine();
|
|
void createTable(string n);
|
|
void createTable(string n, vector<Attribute> a);
|
|
void createTable(Relation r);
|
|
void insertValues(string r, vector <string> v);
|
|
vector<Relation> getRelations();
|
|
//void showTable(Relation r);
|
|
Relation& getTableFromName(string n);
|
|
void saveToFile(vector<string> cmds);
|
|
Relation selection(string attName, string s, Relation r);
|
|
Relation projection(vector<string> input, Relation r);
|
|
<<<<<<< HEAD
|
|
Relation product(string s1, Relation r1, Relation r2);
|
|
void rename(Relation& r, vector<string> oldnames, vector<string> newnames);
|
|
void save();
|
|
void save(string n);
|
|
void storeCommands(string s);
|
|
Relation setUnion(Relation r1, Relation r2);
|
|
//void setDiff();
|
|
//void crossProduct();
|
|
=======
|
|
void save();
|
|
void storeCommands(string s);
|
|
void rename(Relation& r, vector<string> oldnames, vector<string> newnames);
|
|
Relation setUnion(Relation r1, Relation r2);
|
|
Relation setDiff(Relation r1, Relation r2);
|
|
Relation crossProduct(Relation r1, Relation r2);
|
|
>>>>>>> master
|
|
};
|