-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCatalogManager.h
More file actions
38 lines (33 loc) · 1.49 KB
/
CatalogManager.h
File metadata and controls
38 lines (33 loc) · 1.49 KB
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
#ifndef CATALOGMANAGER_H
#define CATALOGMANAGER_H
#include <string>
#include <vector>
#include "Attribute.h"
#include "BufferManager.h"
#include "IndexInfo.h"
using namespace std;
class CatalogManager {
public:
BufferManager bm;
CatalogManager();
virtual ~CatalogManager();
int addIndex(string indexName,string tableName,string attributeName,int type);//先打开Indexs文件,往里能放得下的block里添加索引信息,
int revokeIndexOnAttribute(string tableName,string AttributeName,string indexName);
int findTable(string tableName);
int findIndex(string indexName);
int dropTable(string tableName);
int dropIndex(string index);
int deleteValue(string tableName, int deleteNum);// delete the number of record
int insertRecord(string tableName, int addNum); // increment the number of record
int getRecordNum(string tableName);
int indexNameListGet(string tableName, vector<string>* indexNameVector);
int getAllIndex(vector<IndexInfo> * indexs);
int setIndexOnAttribute(string tableName,string AttributeName,string indexName);
int addTable(string tableName, vector<Attribute>* attributeVector, string primaryKeyName ,int primaryKeyLocation );
int getIndexType(string indexName);
int attributeGet(string tableName, vector<Attribute>* attributeVector);
int calcuteLenth(string tableName);//recordsize
int calcuteLenth2(int type);
void recordStringGet(string tableName, vector<string>* recordContent, char* recordResult);
};
#endif