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();
|
||
bool isRelation(string n);
|
||
//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);
|
||
Relation product(string s1, Relation r1, Relation r2);
|
||
void deleteRelation(string n);
|
||
void save();
|
||
void save(string n);
|
||
void storeCommands(string s);
|
||
Relation rename(vector<string> newnames, Relation &r);
|
||
Relation setUnion(Relation r1, Relation r2);
|
||
Relation setDiff(Relation r1, Relation r2);
|
||
Relation crossProduct(Relation r1, Relation r2);
|
||
Relation update();
|
||
|
||
//UPDATE Senator
|
||
//SET Party = ‘Independent’
|
||
//WHERE Name = ‘Joseph Lieberman’;
|
||
|
||
//Relation deleteCmd();
|
||
};
|