mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
m::DatabaseCommand Struct Referenceabstract

The command pattern for operations in the DBMS. More...

#include <DatabaseCommand.hpp>

Inheritance diagram for m::DatabaseCommand:
[legend]
Collaboration diagram for m::DatabaseCommand:
[legend]

Public Member Functions

virtual ~DatabaseCommand ()=default
 
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>
Tast ()
 
template<typename T = ast::Command>
requires std::derived_from<T, ast::Command>
const Tast () const
 
std::unique_ptr< ast::Commandast (std::unique_ptr< ast::Command > new_ast)
 
Scheduler::Transactiontransaction ()
 
void transaction (Scheduler::Transaction *t)
 

Private Attributes

std::unique_ptr< ast::Commandast_
 

‍the AST of the command; optional


 
Scheduler::Transactiont_
 

‍the transaction this command belongs to


 

Detailed Description

The command pattern for operations in the DBMS.

Definition at line 20 of file DatabaseCommand.hpp.

Constructor & Destructor Documentation

◆ ~DatabaseCommand()

virtual m::DatabaseCommand::~DatabaseCommand ( )
virtualdefault

Member Function Documentation

◆ accept() [1/2]

virtual void m::DatabaseCommand::accept ( ConstDatabaseCommandVisitor &  v) const
pure virtual

◆ accept() [2/2]

virtual void m::DatabaseCommand::accept ( DatabaseCommandVisitor &  v)
pure virtual

◆ ast() [1/3]

template<typename T = ast::Command>
requires std::derived_from<T, ast::Command>
T & m::DatabaseCommand::ast ( )
inline

Definition at line 39 of file DatabaseCommand.hpp.

References ast_, and m::T().

Referenced by m::QueryDatabase::execute().

◆ ast() [2/3]

template<typename T = ast::Command>
requires std::derived_from<T, ast::Command>
const T & m::DatabaseCommand::ast ( ) const
inline

Definition at line 42 of file DatabaseCommand.hpp.

References ast_, and m::T().

◆ ast() [3/3]

std::unique_ptr< ast::Command > m::DatabaseCommand::ast ( std::unique_ptr< ast::Command new_ast)
inline

Definition at line 44 of file DatabaseCommand.hpp.

References ast_.

◆ execute()

virtual void m::DatabaseCommand::execute ( Diagnostic diag)
pure virtual

◆ transaction() [1/2]

Scheduler::Transaction * m::DatabaseCommand::transaction ( )
inline

Definition at line 48 of file DatabaseCommand.hpp.

References t_.

Referenced by m::QueryDatabase::execute(), m::InsertRecords::execute(), and m::ImportDSV::execute().

◆ transaction() [2/2]

void m::DatabaseCommand::transaction ( Scheduler::Transaction t)
inline

Definition at line 49 of file DatabaseCommand.hpp.

References t_.

Field Documentation

◆ ast_

std::unique_ptr<ast::Command> m::DatabaseCommand::ast_
private

‍the AST of the command; optional

Definition at line 24 of file DatabaseCommand.hpp.

Referenced by ast().

◆ t_

Scheduler::Transaction* m::DatabaseCommand::t_
private

‍the transaction this command belongs to

Definition at line 26 of file DatabaseCommand.hpp.

Referenced by transaction().


The documentation for this struct was generated from the following file: