tinySQL
0.1
A self-contained database management system
|
Go to the documentation of this file.
14 #include "share/data_t.h"
15 #include "hsql/SQLParser.h"
16 #include "catalog/catalog.h"
25 Exec_Engine():index_manager(&bfm), catalog_manager(&bfm) ,record_manager(&bfm, &catalog_manager, &index_manager){};
50 void selectRecord(std::string &table_name, std::vector<std::string>& attr_names, std::vector<Where>& wheres, std::vector<MemoryTuple>& result);
58 void insertRecord(std::string &table_name, MemoryTuple &row);
67 void createIndex(std::string &table_name, std::string &index_name, std::string &attr_name);
82 void deleteRecord(std::string &table_name, std::vector<Where>& data);
90 void updateRecord(std::string &table_name, std::vector<Where>& data);
105 catalog_manager.ShowAllTable();
Manage all the table names, attritbutes, and index existence.
void updateRecord(std::string &table_name, std::vector< Where > &data)
Update a record based on conditions.
void deleteRecord(std::string &table_name, std::vector< Where > &data)
Delete records by conditions.
void showTables()
display the information of all the tables
Buffer manager is an abstraction of memory on computer for modules at higher level.
void createTable(std::string &table_name, Attribute &attr)
Create a Table.
void selectRecord(std::string &table_name, std::vector< std::string > &attr_names, std::vector< Where > &wheres, std::vector< MemoryTuple > &result)
Select records by conditions.
Attribute getTableAttributes(const std::string &table_name)
Get the Table Attributes.
The class manages the table's data.
void createIndex(std::string &table_name, std::string &index_name, std::string &attr_name)
Create Index on a table's attribute.
void dropTable(std::string &table_name)
Delete a Table.
Execute commands from the interface.
void dropIndex(std::string &index_name)
Delete the index of a certain index on a table.
The attributes for a schema.
void insertRecord(std::string &table_name, MemoryTuple &row)
Insert a piece of record.