|
tinySQL
0.1
A self-contained database management system
|
Manage all the table names, attritbutes, and index existence. More...
#include <catalog.h>
Public Member Functions | |
| CatalogManager (BufferManager *bfm) | |
| void | CreateTable (const std::string &table_name, Attribute &attr) |
| Create a Table object. More... | |
| void | UpdateIndex (const std::string &table_name, const std::string &attr_name, const std::string &index_name) |
| Update Index. More... | |
| void | DropTable (const std::string &table_name) |
| Delete a table. More... | |
| void | DropIndex (const std::string &table_name, const std::string &index_name) |
| Delete an index file. More... | |
| bool | existTable (const std::string &table_name) |
| Judge if the table exists. More... | |
| bool | existAttribute (const std::string &table_name, const std::string &attr_name) |
| Judge if an attribute in of a table exists. More... | |
| Attribute | getAttribute (const std::string &table_name) |
| Get the Attribute from table name. More... | |
| Index | getIndex (const std::string &table_name) |
| Get the Index object from table name. More... | |
| std::string | getIndexName (const std::string &table_name, const std::string &attr_name) |
| std::string | Index2Attr (const std::string &table_name, const std::string &attr_name, const std::string &index_name) |
| void | ShowTable (const std::string &table_name) |
| void | ShowAllTable () |
| std::string | indexName2table (std::string &index_name) const |
Manage all the table names, attritbutes, and index existence.
| void CatalogManager::CreateTable | ( | const std::string & | table_name, |
| Attribute & | attr | ||
| ) |
Create a Table object.
| table_name | 表的名字 |
| attr | 屬性 |
| index | 索引 |
| primary | Primary Key的位置 |
Definition at line 113 of file Catalog_Manager.cpp.


| void CatalogManager::DropIndex | ( | const std::string & | table_name, |
| const std::string & | index_name | ||
| ) |
Delete an index file.
| table_name | 通过table_name查找該表 |
| index_name | 通过index_name來刪除index |
Definition at line 213 of file Catalog_Manager.cpp.


| void CatalogManager::DropTable | ( | const std::string & | table_name | ) |
Delete a table.
| table_name | 通过表的名字來刪除表格 |
Definition at line 164 of file Catalog_Manager.cpp.


| bool CatalogManager::existAttribute | ( | const std::string & | table_name, |
| const std::string & | attr_name | ||
| ) |
Judge if an attribute in of a table exists.
| table_name | Name of table |
| attr_name | The attribute name |
Definition at line 70 of file Catalog_Manager.cpp.


| bool CatalogManager::existTable | ( | const std::string & | table_name | ) |
Judge if the table exists.
| table_name | 通过表的名字來判斷表是否存在 |
Definition at line 65 of file Catalog_Manager.cpp.

| Attribute CatalogManager::getAttribute | ( | const std::string & | table_name | ) |
Get the Attribute from table name.
| table_name | 通过表的名字來獲取屬性 |
Definition at line 285 of file Catalog_Manager.cpp.


| Index CatalogManager::getIndex | ( | const std::string & | table_name | ) |
Get the Index object from table name.
| table_name |
Definition at line 240 of file Catalog_Manager.cpp.


| std::string CatalogManager::Index2Attr | ( | const std::string & | table_name, |
| const std::string & | attr_name, | ||
| const std::string & | index_name | ||
| ) |
| table_name | 通过table_name來獲取當前的table |
| attr_name | 通过attr_name來獲取當前的attribute |
| index_name | 通过index_name來獲取attribute |
Definition at line 353 of file Catalog_Manager.cpp.

| void CatalogManager::ShowTable | ( | const std::string & | table_name | ) |
| table_name | 通过table_name來獲取當前表格的信息 |
Definition at line 372 of file Catalog_Manager.cpp.

| void CatalogManager::UpdateIndex | ( | const std::string & | table_name, |
| const std::string & | attr_name, | ||
| const std::string & | index_name | ||
| ) |
Update Index.
| table_name | 通过table_name來找對應的table |
| attr_name | 通过attr_name來找對應的attribute |
| index_name | 通过index_name來防止命名重複 |
Definition at line 172 of file Catalog_Manager.cpp.


1.8.17