![]() |
mutable
A Database System for Research and Fast Prototyping
|
Import records from a delimiter separated values (DSV) file into a Table
of a Database
.
More...
#include <DatabaseCommand.hpp>
Public Types | |
using | DSVConfig = DSVReader::Config |
Public Member Functions | |
ImportDSV (const Table &table, std::filesystem::path path, DSVConfig cfg) | |
void | accept (DatabaseCommandVisitor &v) override |
void | accept (ConstDatabaseCommandVisitor &v) const override |
void | execute (Diagnostic &diag) override |
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 | |
const Table & | table_ |
std::filesystem::path | path_ |
DSVConfig | cfg_ |
std::unique_ptr< ast::Command > | ast_ |
| |
Scheduler::Transaction * | t_ |
| |
Import records from a delimiter separated values (DSV) file into a Table
of a Database
.
Definition at line 159 of file DatabaseCommand.hpp.
Definition at line 161 of file DatabaseCommand.hpp.
Definition at line 169 of file DatabaseCommand.hpp.
|
overridevirtual |
Implements m::DatabaseCommand.
|
overridevirtual |
Implements m::DatabaseCommand.
|
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_.
|
overridevirtual |
Executes the command.
Implements m::DatabaseCommand.
Definition at line 199 of file DatabaseCommand.cpp.
References cfg_, m::Diagnostic::err(), m::Catalog::Get(), M_TIME_EXPR, path_, table_, m::Catalog::timer(), m::DatabaseCommand::transaction(), and m::exception::what().
|
inlineinherited |
Definition at line 48 of file DatabaseCommand.hpp.
References m::DatabaseCommand::t_.
Referenced by m::QueryDatabase::execute(), m::InsertRecords::execute(), and execute().
|
inlineinherited |
Definition at line 49 of file DatabaseCommand.hpp.
References m::DatabaseCommand::t_.
|
privateinherited |
the AST of the command; optional
Definition at line 24 of file DatabaseCommand.hpp.
Referenced by m::DatabaseCommand::ast().
|
private |
Definition at line 166 of file DatabaseCommand.hpp.
Referenced by execute().
|
private |
Definition at line 165 of file DatabaseCommand.hpp.
Referenced by execute().
|
privateinherited |
the transaction this command belongs to
Definition at line 26 of file DatabaseCommand.hpp.
Referenced by m::DatabaseCommand::transaction().
|
private |
Definition at line 164 of file DatabaseCommand.hpp.
Referenced by execute().