|
tinySQL
0.1
A self-contained database management system
|
The class manages the table's data. More...
#include <record_manager.h>
Public Member Functions | |
| RecordManager (BufferManager *bfm, CatalogManager *clm, IndexManager *idm) | |
| void | CreateTableFile (const std::string &table_name) |
| Create a Table File object. More... | |
| void | DropTableFile (const std::string &table_name) |
| Drop a Table File object. More... | |
| void | InsertRecord (std::string table_name, const MemoryTuple &tuple) |
| 向对应表中插入一条记录 More... | |
| int | DeleteRecord (std::string table_name) |
| 删除对应表中所有记录(不删除表文件) More... | |
| int | DeleteRecord (std::string table_path, std::vector< Where > where) |
| 删除对应表中所有目标属性值满足Where条件的记录 More... | |
| std::vector< MemoryTuple > | SelectRecord (std::string table_name) |
| 返回整张表 More... | |
| std::vector< MemoryTuple > | SelectRecord (const std::string &table_path, const std::vector< std::string > &target_attr) |
| std::vector< MemoryTuple > | SelectRecord (std::string table_path, std::vector< Where > where) |
| 返回包含所有目标属性满足Where条件的记录的表 More... | |
| std::vector< MemoryTuple > | SelectRecord (std::string table_name, const std::vector< std::string > &target_attr, std::vector< Where > where) |
| void | CreateIndex (std::string table_name, const std::string &target_attr) |
| Create a Index on an attribute that has already exists. More... | |
The class manages the table's data.
Definition at line 63 of file record_manager.h.
| void RecordManager::CreateIndex | ( | std::string | table_name, |
| const std::string & | target_attr | ||
| ) |
Create a Index on an attribute that has already exists.
| index_manager | |
| table_name | 表的名字 |
| target_attr | 目标属性 |
| 如果表不存在,抛出table_not_exist异常。如果属性不存在,抛出attribute_not_exist异常。 |
Definition at line 521 of file record_manager.cpp.


| void RecordManager::CreateTableFile | ( | const std::string & | table_name | ) |
Create a Table File object.
| table_name | 表的名字 |
Definition at line 41 of file record_manager.cpp.

| int RecordManager::DeleteRecord | ( | std::string | table_name | ) |
删除对应表中所有记录(不删除表文件)
| table_name | 表的名字 |
Definition at line 151 of file record_manager.cpp.


| int RecordManager::DeleteRecord | ( | std::string | table_path, |
| std::vector< Where > | where | ||
| ) |
删除对应表中所有目标属性值满足Where条件的记录
| table_path | 表的名字 |
| target_attr | 目标属性 |
| where | where条件 |
Definition at line 199 of file record_manager.cpp.

| void RecordManager::DropTableFile | ( | const std::string & | table_name | ) |
Drop a Table File object.
| table_name | 表的名字 |
Definition at line 50 of file record_manager.cpp.

| void RecordManager::InsertRecord | ( | std::string | table_name, |
| const MemoryTuple & | tuple | ||
| ) |
向对应表中插入一条记录
| table_name | 表的名字 |
| tuple | 元组 |
Definition at line 61 of file record_manager.cpp.


| std::vector< MemoryTuple > RecordManager::SelectRecord | ( | std::string | table_name | ) |
返回整张表
| table_name | 表的名字 |
| result_table_name | 返回的表的名字 |
Definition at line 276 of file record_manager.cpp.


| std::vector< MemoryTuple > RecordManager::SelectRecord | ( | std::string | table_path, |
| std::vector< Where > | where | ||
| ) |
返回包含所有目标属性满足Where条件的记录的表
| table_path | 表的名字 |
| target_attr | 投影属性 |
| where | where条件,内含属性 |
| result_table_name | 返回的表的名字 |
Definition at line 348 of file record_manager.cpp.

1.8.17