Newer
Older
Builder::Builder(DataMode dataMode) : dataMode(dataMode)
QueryInput Builder::buildQueryInput() const
{
QueryInput input;
input.memoryQueries = buildMemoryQueries();
input.dataMode = dataMode;
return input;
}
armem::query::data::Input Builder::buildQueryInputIce() const
{
return buildQueryInput().toIce();
}
armem::query::data::MemoryQuerySeq Builder::buildMemoryQueries() const
armem::query::data::MemoryQuerySeq memoryQueries;
for (const CoreSegmentSelector& child : _children)
for (armem::query::data::MemoryQueryPtr& query : child.buildQueries())
query->targets = _targets;
memoryQueries.push_back(query);
}
}
return memoryQueries;
}
CoreSegmentSelector& Builder::coreSegments()
CoreSegmentSelector& Builder::coreSegments(const CoreSegmentSelector& selector)
void Builder::all()
{
coreSegments().all()
.providerSegments().all()
.entities().all()
.snapshots().all();
}
void Builder::allLatest()
{
coreSegments().all()
.providerSegments().all()
.entities().all()
.snapshots().latest();
}
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
void Builder::allInCoreSegment(const MemoryID& coreSegmentID)
{
coreSegments().withName(coreSegmentID.coreSegmentName)
.providerSegments().all()
.entities().all()
.snapshots().all();
}
void Builder::allLatestInCoreSegment(const MemoryID& coreSegmentID)
{
coreSegments().withName(coreSegmentID.coreSegmentName)
.providerSegments().all()
.entities().all()
.snapshots().latest();
}
void Builder::allInProviderSegment(const MemoryID& providerSegmentID)
{
coreSegments().withName(providerSegmentID.coreSegmentName)
.providerSegments().withName(providerSegmentID.providerSegmentName)
.entities().all()
.snapshots().all();
}
void Builder::allLatestInProviderSegment(const MemoryID& providerSegmentID)
{
coreSegments().withName(providerSegmentID.coreSegmentName)
.providerSegments().withName(providerSegmentID.providerSegmentName)
.entities().all()
.snapshots().latest();
}
void Builder::allEntitySnapshots(const MemoryID& entityID)
{
coreSegments().withName(entityID.coreSegmentName)
.providerSegments().withName(entityID.providerSegmentName)
.entities().withName(entityID.entityName)
.snapshots().all();
}
void Builder::latestEntitySnapshot(const MemoryID& entityID)
{
coreSegments().withName(entityID.coreSegmentName)
.providerSegments().withName(entityID.providerSegmentName)
.entities().withName(entityID.entityName)
.snapshots().latest();
}
void Builder::singleEntitySnapshot(const MemoryID& snapshotID)
{
coreSegments().withName(snapshotID.coreSegmentName)
.providerSegments().withName(snapshotID.providerSegmentName)
.entities().withName(snapshotID.entityName)
.snapshots().atTime(snapshotID.timestamp);
}