6 #ifndef KNOWROB_QUERYABLE_STORAGE_H
7 #define KNOWROB_QUERYABLE_STORAGE_H
9 #include "knowrob/queries/TokenBuffer.h"
11 #include "knowrob/queries/Answer.h"
12 #include "knowrob/semweb/GraphPathQuery.h"
13 #include "knowrob/queries/AnswerYes.h"
14 #include "knowrob/queries/AnswerNo.h"
15 #include "knowrob/semweb/GraphConnective.h"
16 #include "knowrob/semweb/GraphQueryExpansion.h"
25 class QueryableStorage :
public Storage {
std::optional< std::string > getVersionOfOrigin(std::string_view origin)
virtual bool isPersistent() const =0
GraphQueryExpansionPtr expand(const GraphQueryPtr &q)
virtual void count(const ResourceCounter &callback) const =0
~QueryableStorage() override=default
static std::shared_ptr< AnswerYes > yes(const GraphPathQueryPtr &original, const GraphQueryExpansionPtr &expansion, const BindingsPtr &bindings)
virtual void batch(const TripleHandler &callback) const =0
virtual void batchOrigin(std::string_view origin, const TripleHandler &callback)=0
QueryableStorage(StorageFeatures features=StorageFeature::NothingSpecial)
virtual void match(const TriplePattern &query, const TripleVisitor &visitor)
void setVersionOfOrigin(std::string_view origin, std::string_view version)
static AtomPtr versionProperty
virtual bool contains(const Triple &triple)
void dropSessionOrigins()
virtual void query(const GraphQueryPtr &query, const BindingsHandler &callback)=0
std::vector< VersionedOriginPtr > getOrigins()
static std::shared_ptr< AnswerNo > no(const GraphPathQueryPtr &q)
FunctionRule & function()
std::function< void(const TriplePtr &)> TripleVisitor
std::shared_ptr< GraphQueryExpansion > GraphQueryExpansionPtr
std::shared_ptr< const Bindings > BindingsPtr
std::function< void(std::string_view, uint64_t)> ResourceCounter
std::function< void(const BindingsPtr &)> BindingsHandler
std::shared_ptr< Atom > AtomPtr
std::function< void(const TripleContainerPtr &)> TripleHandler
std::shared_ptr< GraphQuery > GraphQueryPtr
std::shared_ptr< QueryableStorage > QueryableBackendPtr
std::shared_ptr< GraphPathQuery > GraphPathQueryPtr