OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
BlockHandlerDatabaseAccess.h
Go to the documentation of this file.
1#pragma once
2#include "BlockHandler.h"
5#include "MetadataCampaign.h"
6#include "MetadataParameter.h"
11
13{
14public:
15 BlockHandlerDatabaseAccess(EntityBlockDatabaseAccess* blockEntity, const HandlerMap& handlerMap);
17
18 bool executeSpecialized() override;
19
20private:
21 struct QueryDescription
22 {
23 std::string m_connectorName;
24 std::string m_projectionName;
25 PipelineData m_outputData;
26 };
27
28 DataStorageAPI::ResultDataStorageAPI* m_resultCollectionAccess = nullptr;
29 ResultCollectionMetadataAccess* m_resultCollectionMetadataAccess = nullptr;
30 std::list< BsonViewOrValue> m_comparisons;
31
32 std::list< QueryDescription> m_queryDescriptions;
33
34 BsonViewOrValue m_query;
35 BsonViewOrValue m_projection;
36
37 void buildRangeQuery(const ValueComparisionDefinition& _definition, AdvancedQueryBuilder& _builder, ot::StringToVariableConverter& _converter);
38 void buildContainsQuery(const ValueComparisionDefinition& _definition, AdvancedQueryBuilder& _builder, ot::StringToVariableConverter& _converter, bool _contains);
39 void setValueFromString(std::unique_ptr<ot::Variable>& _value, const std::string& _valueString, const std::string& _valueType) const;
40 ot::Variable setValueFromString(const std::string& _valueString, const std::string& _valueType) const;
41 void addComparision(const ValueComparisionDefinition& _definition);
42 void addParameter(ValueComparisionDefinition& definition, const MetadataParameter& parameter, const std::string& connectorName);
43};
bsoncxx::document::view_or_value BsonViewOrValue
Definition DocumentAccess.h:12
Definition BlockHandlerDatabaseAccess.h:13
bool executeSpecialized() override
Definition BlockHandlerDatabaseAccess.cpp:165
BlockHandlerDatabaseAccess(EntityBlockDatabaseAccess *blockEntity, const HandlerMap &handlerMap)
Definition BlockHandlerDatabaseAccess.cpp:24
~BlockHandlerDatabaseAccess()
Definition BlockHandlerDatabaseAccess.cpp:151
Definition BlockHandler.h:10
std::map< std::shared_ptr< GraphNode >, std::shared_ptr< BlockHandler > > HandlerMap
Definition BlockHandler.h:12
Definition Variable.h:107
Definition PipelineData.h:14