GridGain C++
thin-client/include/ignite/thin/cache/query/query_fields_row.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef _IGNITE_THIN_CACHE_QUERY_QUERY_FIELDS_ROW
23 #define _IGNITE_THIN_CACHE_QUERY_QUERY_FIELDS_ROW
24 
25 #include <ignite/common/concurrent.h>
26 #include <ignite/ignite_error.h>
27 
28 #include <ignite/impl/thin/readable.h>
29 
30 namespace ignite
31 {
32  namespace thin
33  {
34  namespace cache
35  {
36  namespace query
37  {
45  class IGNITE_IMPORT_EXPORT QueryFieldsRow
46  {
47  public:
55  explicit QueryFieldsRow(const common::concurrent::SharedPointer<void>& impl);
56 
62  bool HasNext();
63 
74  template<typename T>
75  T GetNext()
76  {
77  T res;
78  impl::thin::ReadableImpl<T> readable(res);
79 
80  InternalGetNext(readable);
81 
82  return res;
83  }
84 
85  private:
93  void InternalGetNext(impl::thin::Readable& readable);
94 
96  common::concurrent::SharedPointer<void> impl;
97  };
98  }
99  }
100  }
101 }
102 
103 #endif //_IGNITE_THIN_CACHE_QUERY_QUERY_FIELDS_ROW
ignite
Ignite API.
Definition: cache.h:47
ignite::thin::cache::query::QueryFieldsRow
Query fields row.
Definition: thin-client/include/ignite/thin/cache/query/query_fields_row.h:45
ignite::thin::cache::query::QueryFieldsRow::GetNext
T GetNext()
Get next entry.
Definition: thin-client/include/ignite/thin/cache/query/query_fields_row.h:75
ignite_error.h
ignite::impl::thin::ReadableImpl
Definition: thin-client/include/ignite/thin/cache/cache_entry.h:35