VMware Tanzu GemFire Native C++ Reference 10.3.0
Query.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#pragma once
19
20#ifndef GEODE_QUERY_H_
21#define GEODE_QUERY_H_
22
23#include <chrono>
24
25#include "SelectResults.hpp"
26#include "internal/geode_globals.hpp"
27
32namespace apache {
33namespace geode {
34namespace client {
35
48class APACHE_GEODE_EXPORT Query {
49 public:
50 virtual ~Query() noexcept = default;
51
68 virtual std::shared_ptr<SelectResults> execute(
69 std::chrono::milliseconds timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) = 0;
70
90 virtual std::shared_ptr<SelectResults> execute(
91 std::shared_ptr<CacheableVector> paramList,
92 std::chrono::milliseconds timeout = DEFAULT_QUERY_RESPONSE_TIMEOUT) = 0;
99 virtual const std::string& getQueryString() const = 0;
100
107 virtual void compile() = 0;
108
116 virtual bool isCompiled() = 0;
117};
118
119} // namespace client
120} // namespace geode
121} // namespace apache
122
123#endif // GEODE_QUERY_H_
A Query is obtained from a QueryService which in turn is obtained from the Cache.
Definition: Query.hpp:48
virtual void compile()=0
Compile the Query - client side query compilation is not supported.
virtual const std::string & getQueryString() const =0
Get the query string provided when a new Query was created from a QueryService.
virtual std::shared_ptr< SelectResults > execute(std::shared_ptr< CacheableVector > paramList, std::chrono::milliseconds timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0
Executes the parameterized OQL Query on the cache server and returns the results.
virtual bool isCompiled()=0
Check whether the Query is compiled - client side query compilation is not supported.
virtual std::shared_ptr< SelectResults > execute(std::chrono::milliseconds timeout=DEFAULT_QUERY_RESPONSE_TIMEOUT)=0
Executes the OQL Query on the cache server and returns the results.

Apache Geode C++ Cache API Documentation