blob: e231ac35975f6418d01e0abe32695f3b07586dde [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)
Václav Kubernátde598b02020-06-08 17:42:31 +02009 , m_schema(m_datastore.schema())
Václav Kubernátab612e92019-11-26 19:51:31 +010010{
Václav Kubernátab612e92019-11-26 19:51:31 +010011}
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}