blob: be979ff7ad4a4669cf058cc32440963a60ac5cf9 [file] [log] [blame]
Václav Kubernátab612e92019-11-26 19:51:31 +01001#include "data_query.hpp"
2#include "datastore_access.hpp"
3#include "schema.hpp"
4#include "utils.hpp"
5
6
7DataQuery::DataQuery(DatastoreAccess& datastore)
8 : m_datastore(datastore)
9{
10 m_schema = m_datastore.schema();
11}
12
13std::vector<ListInstance> DataQuery::listKeys(const dataPath_& location, const ModuleNodePair& node) const
14{
15 auto listPath = joinPaths(pathToDataString(location, Prefixes::Always), fullNodeName(location, node));
16
17 return m_datastore.listInstances(listPath);
18}