38 #ifndef DATABASE_SERVER_IDATASOURCE_H 39 #define DATABASE_SERVER_IDATASOURCE_H 45 #include "src/database-server/data-model/variable.h" 46 #include "src/database-server/data-model/varvalue.h" 108 const std::string& var_name,
120 const std::string& var_name,
VarValue(Variable &&variable, double &&val, std::uint64_t &&ts)
Definition: varvalue.cc:45
IDataSource(const IDataSource &)=delete
Definition: variable.h:44
Err
Definition: idatasource.h:57
virtual ~IDataSource()=default
virtual Err count_variable_values(const std::string &var_name, const std::function< void(size_t count)> &send_count) noexcept=0
count_variable_values count all values of a given variable
virtual Err add_variable_value(const VarValue &var_value) noexcept=0
add_variable_value add a new value for the variable.
virtual Err fetch_variable_values(const std::string &var_name, const std::function< void(const VarValue &val, size_t index)> &send_vale) noexcept=0
fetch_variable_values get all values of a given variable
IDataSource(IDataSource &&)=default
virtual Err count_variable_values(const std::string &var_name, const std::chrono::system_clock::time_point &start_date, const std::chrono::system_clock::time_point &end_date, const std::function< void(size_t count)> &send_count) noexcept=0
count_variable_values count all values of a given variable
virtual Err fetch_variables(const std::function< void(const Variable &var, size_t index)> &send_vale) noexcept=0
fetch_variables get all variables
virtual Err add_variable(const Variable &variable) noexcept=0
add_variable add a variable to be tracket for the system (by default the only supported variabe value...
IDataSource & operator=(IDataSource &&)=default
virtual Err create_scheme() noexcept=0
create_scheme create data storage persistence, e.g. schema for a relational database ...
IDataSource & operator=(const IDataSource &)=delete