blob: cef7ec3cf5afc62f7683cd8d656a8191e7e72990 [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
Václav Kubernát2db124c2020-05-28 21:58:36 +020013std::vector<ListInstance> DataQuery::listKeys(const dataPath_& listPath) const
Václav Kubernátab612e92019-11-26 19:51:31 +010014{
Václav Kubernát2db124c2020-05-28 21:58:36 +020015 auto listPathString = pathToDataString(listPath, Prefixes::Always);
Václav Kubernátab612e92019-11-26 19:51:31 +010016
Václav Kubernát2db124c2020-05-28 21:58:36 +020017 return m_datastore.listInstances(listPathString);
Václav Kubernátab612e92019-11-26 19:51:31 +010018}