![]() |
mutable
A Database System for Research and Fast Prototyping
|
A DatabaseInstruction
represents an invokation of an instruction with (optional) arguments.
More...
#include <DatabaseCommand.hpp>
Public Member Functions | |
DatabaseInstruction (std::vector< std::string > args) | |
const std::vector< std::string > & | args () const |
Returns the arguments of this instruction. | |
virtual void | accept (DatabaseCommandVisitor &v)=0 |
virtual void | accept (ConstDatabaseCommandVisitor &v) const =0 |
virtual void | execute (Diagnostic &diag)=0 |
Executes the command. | |
template<typename T = ast::Command> requires std::derived_from<T, ast::Command> | |
T & | ast () |
template<typename T = ast::Command> requires std::derived_from<T, ast::Command> | |
const T & | ast () const |
std::unique_ptr< ast::Command > | ast (std::unique_ptr< ast::Command > new_ast) |
Scheduler::Transaction * | transaction () |
void | transaction (Scheduler::Transaction *t) |
Private Attributes | |
std::vector< std::string > | args_ |
the arguments of this instruction | |
std::unique_ptr< ast::Command > | ast_ |
| |
Scheduler::Transaction * | t_ |
| |
A DatabaseInstruction
represents an invokation of an instruction with (optional) arguments.
A new instruction can be implemented by making a new subclass of DatabaseInstruction
. The newly implemented instruction must then be registered in the Catalog
using Catalog::register_instruction()
.
Definition at line 73 of file DatabaseCommand.hpp.
|
inline |
Definition at line 79 of file DatabaseCommand.hpp.
|
pure virtualinherited |
|
pure virtualinherited |
|
inline |
Returns the arguments of this instruction.
Definition at line 82 of file DatabaseCommand.hpp.
References args_.
|
inlineinherited |
Definition at line 39 of file DatabaseCommand.hpp.
References m::DatabaseCommand::ast_, and m::T().
Referenced by m::QueryDatabase::execute().
|
inlineinherited |
Definition at line 42 of file DatabaseCommand.hpp.
References m::DatabaseCommand::ast_, and m::T().
|
inlineinherited |
Definition at line 44 of file DatabaseCommand.hpp.
References m::DatabaseCommand::ast_.
|
pure virtualinherited |
Executes the command.
Implemented in m::EmptyCommand, m::learn_spns, m::QueryDatabase, m::InsertRecords, m::UpdateRecords, m::DeleteRecords, m::ImportDSV, m::CreateDatabase, m::DropDatabase, m::UseDatabase, m::CreateTable, m::DropTable, m::CreateIndex, and m::DropIndex.
|
inlineinherited |
Definition at line 48 of file DatabaseCommand.hpp.
References m::DatabaseCommand::t_.
Referenced by m::QueryDatabase::execute(), m::InsertRecords::execute(), and m::ImportDSV::execute().
|
inlineinherited |
Definition at line 49 of file DatabaseCommand.hpp.
References m::DatabaseCommand::t_.
|
private |
the arguments of this instruction
Definition at line 76 of file DatabaseCommand.hpp.
Referenced by args().
|
privateinherited |
the AST of the command; optional
Definition at line 24 of file DatabaseCommand.hpp.
Referenced by m::DatabaseCommand::ast().
|
privateinherited |
the transaction this command belongs to
Definition at line 26 of file DatabaseCommand.hpp.
Referenced by m::DatabaseCommand::transaction().