kDB: Knowledge DataBase
Loading...
Searching...
No Matches
Query.h
1/*
2 * Copyright (c) 2015 Cyrille Berger <cberger@cberger.net>
3 *
4 */
5
6#ifndef _KDB_SPARQL_QUERY_H_
7#define _KDB_SPARQL_QUERY_H_
8
9#include <QSharedDataPointer>
10
11#include <kDB/Forward.h>
12
13namespace kDB::SPARQL
14{
15 namespace Algebra
16 {
17 class Node;
18 }
19 class Query
20 {
21 protected:
22 struct Private;
23 Query(Private* _private);
24 public:
25 enum class Type
26 {
27 Invalid,
28 Select,
29 Construct,
30 Describe,
31 Ask,
32 Update,
33 Execute,
34 Explain,
35 PL
36 };
37 public:
38 Query();
39 Query(const Query& _rhs);
40 Query& operator=(const Query& _rhs);
41 ~Query();
42 const Algebra::Node* getNode() const;
43 Type type() const;
44 public:
45 static QList<Query> parse(const QByteArray& _query, const knowCore::ValueHash& _bindings,
46 knowCore::Messages* _messages, const knowCore::Uri& _base);
47 static QList<Query> parse(const QString& _query, const knowCore::ValueHash& _bindings,
48 knowCore::Messages* _messages, const knowCore::Uri& _base);
49 protected:
50 QSharedDataPointer<Private> d;
51 };
52} // namespace kDB::SPARQL
53
54#endif
Definition Revision.h:9
Definition Node.h:21
Definition Query.h:20
Definition Messages.h:18
Definition Uri.h:15
Definition ValueHash.h:13