| tinySQL
    0.1
    A self-contained database management system | 
Execute commands from the interface. More...
#include <exec_engine.h>
| Public Member Functions | |
| void | createTable (std::string &table_name, Attribute &attr) | 
| Create a Table.  More... | |
| void | dropTable (std::string &table_name) | 
| Delete a Table.  More... | |
| void | selectRecord (std::string &table_name, std::vector< std::string > &attr_names, std::vector< Where > &wheres, std::vector< MemoryTuple > &result) | 
| Select records by conditions.  More... | |
| void | insertRecord (std::string &table_name, MemoryTuple &row) | 
| Insert a piece of record.  More... | |
| void | createIndex (std::string &table_name, std::string &index_name, std::string &attr_name) | 
| Create Index on a table's attribute.  More... | |
| void | dropIndex (std::string &index_name) | 
| Delete the index of a certain index on a table.  More... | |
| void | deleteRecord (std::string &table_name, std::vector< Where > &data) | 
| Delete records by conditions.  More... | |
| void | updateRecord (std::string &table_name, std::vector< Where > &data) | 
| Update a record based on conditions.  More... | |
| Attribute | getTableAttributes (const std::string &table_name) | 
| Get the Table Attributes.  More... | |
| void | showTables () | 
| display the information of all the tables  More... | |
Execute commands from the interface.
Definition at line 23 of file exec_engine.h.
| void Exec_Engine::createIndex | ( | std::string & | table_name, | 
| std::string & | index_name, | ||
| std::string & | attr_name | ||
| ) | 
Create Index on a table's attribute.
| table_name | [in] Name of table | 
| index_name | [in] Name of index | 
| attr_name | [in] Name of target attribute | 
Definition at line 14 of file exec_engine.cpp.


| void Exec_Engine::createTable | ( | std::string & | table_name, | 
| Attribute & | attr | ||
| ) | 
Create a Table.
| table_name | Name of table | 
| attr | The attritbutes of the table | 
Definition at line 4 of file exec_engine.cpp.


| void Exec_Engine::deleteRecord | ( | std::string & | table_name, | 
| std::vector< Where > & | data | ||
| ) | 
Delete records by conditions.
| table_name | [in] Name of table | 
| data | [in] the condition | 
Definition at line 27 of file exec_engine.cpp.


| void Exec_Engine::dropIndex | ( | std::string & | index_name | ) | 
Delete the index of a certain index on a table.
| index_name | [in] Name of index | 
Definition at line 20 of file exec_engine.cpp.


| void Exec_Engine::dropTable | ( | std::string & | table_name | ) | 
Delete a Table.
| table_name | [in] Name of table | 
Definition at line 9 of file exec_engine.cpp.


| Attribute Exec_Engine::getTableAttributes | ( | const std::string & | table_name | ) | 
Get the Table Attributes.
| table_name | Name of table | 
Definition at line 51 of file exec_engine.cpp.


| void Exec_Engine::insertRecord | ( | std::string & | table_name, | 
| MemoryTuple & | row | ||
| ) | 
Insert a piece of record.
| table_name | [in] Name of table | 
| row | [in] The iece of record to insert | 
Definition at line 55 of file exec_engine.cpp.


| void Exec_Engine::selectRecord | ( | std::string & | table_name, | 
| std::vector< std::string > & | attr_names, | ||
| std::vector< Where > & | wheres, | ||
| std::vector< MemoryTuple > & | result | ||
| ) | 
Select records by conditions.
| table_name | [in] Name of table | 
| attr_names | [in] The attritbues to select | 
| wheres | [in] conditions | 
| result | [out] the result of selection | 
Definition at line 31 of file exec_engine.cpp.


| 
 | inline | 
display the information of all the tables
Definition at line 104 of file exec_engine.h.

| void Exec_Engine::updateRecord | ( | std::string & | table_name, | 
| std::vector< Where > & | data | ||
| ) | 
Update a record based on conditions.
| table_name | Name of table | 
| data | Condition | 
 1.8.17
 1.8.17