Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_CBMAGGREGATORLIBPQXXWRITER_H_
2 #define MOJA_MODULES_CBM_CBMAGGREGATORLIBPQXXWRITER_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
8 #include <moja/flint/spatiallocationinfo.h>
15 template<
class TPersistable,
class TRecord>
16 class RecordAccumulatorWithMutex2;
30 std::shared_ptr<std::vector<std::string>> classifierNames,
31 bool isPrimary =
false)
33 _fluxDimension(fluxDimension),
34 _poolDimension(poolDimension),
35 _errorDimension(errorDimension),
36 _ageDimension(ageDimension),
37 _disturbanceDimension(disturbanceDimension),
38 _classifierNames(classifierNames),
39 _isPrimaryAggregator(isPrimary),
44 void configure(
const DynamicObject& config)
override;
45 void subscribe(NotificationCenter& notificationCenter)
override;
47 flint::ModuleTypes
moduleType()
override {
return flint::ModuleTypes::System; };
49 void doSystemInit()
override;
50 void doLocalDomainInit()
override;
51 void doSystemShutdown()
override;
54 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatFluxRecord>>
_fluxDimension;
55 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatPoolRecord>>
_poolDimension;
56 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatErrorRecord>>
_errorDimension;
57 std::shared_ptr<flint::RecordAccumulatorWithMutex2<std::string, FlatAgeAreaRecord>>
_ageDimension;
69 template<
typename TAccumulator>
70 void load(pqxx::work& tx,
72 const std::string& table,
73 std::shared_ptr<TAccumulator> dataDimension);
75 void doIsolated(pqxx::connection_base& conn, std::string sql,
bool optional =
false);
76 void doIsolated(pqxx::connection_base& conn, std::vector<std::string> sql,
bool optional =
false);
81 #endif // MOJA_MODULES_CBM_CBMAGGREGATORLIBPQXXWRITER_H_
Definition: ageclasshelper.cpp:12
std::string _connectionString
Definition: cbmaggregatorlibpqxxwriter.h:63
Definition: cbmaggregatorcsvwriter.h:21
Definition: cbmmodulebase.h:22
std::shared_ptr< const flint::SpatialLocationInfo > _spatialLocationInfo
Definition: cbmaggregatorlibpqxxwriter.h:61
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatDisturbanceRecord > > _disturbanceDimension
Definition: cbmaggregatorlibpqxxwriter.h:58
Int64 _jobId
Definition: cbmaggregatorlibpqxxwriter.h:65
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatAgeAreaRecord > > _ageDimension
Definition: cbmaggregatorlibpqxxwriter.h:57
Definition: cbmaggregatorlibpqxxwriter.h:22
bool _isPrimaryAggregator
Definition: cbmaggregatorlibpqxxwriter.h:66
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatFluxRecord > > _fluxDimension
Definition: cbmaggregatorlibpqxxwriter.h:54
std::shared_ptr< std::vector< std::string > > _classifierNames
Definition: cbmaggregatorlibpqxxwriter.h:59
std::string _schema
Definition: cbmaggregatorlibpqxxwriter.h:64
Definition: cbmaggregatorcsvwriter.h:19
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatErrorRecord > > _errorDimension
Definition: cbmaggregatorlibpqxxwriter.h:56
CBMAggregatorLibPQXXWriter(std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatFluxRecord >> fluxDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatPoolRecord >> poolDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatErrorRecord >> errorDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatAgeAreaRecord >> ageDimension, std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatDisturbanceRecord >> disturbanceDimension, std::shared_ptr< std::vector< std::string >> classifierNames, bool isPrimary=false)
Definition: cbmaggregatorlibpqxxwriter.h:24
bool _dropSchema
Definition: cbmaggregatorlibpqxxwriter.h:67
flint::ModuleTypes moduleType() override
Definition: cbmaggregatorlibpqxxwriter.h:47
std::shared_ptr< flint::RecordAccumulatorWithMutex2< std::string, FlatPoolRecord > > _poolDimension
Definition: cbmaggregatorlibpqxxwriter.h:55
Definition: ageclasshelper.cpp:10