Apache Ignite C++ Client
Loading...
Searching...
No Matches
table.h
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#include "ignite/client/table/ignite_tuple.h"
21#include "ignite/client/table/key_value_view.h"
22#include "ignite/client/table/qualified_name.h"
23#include "ignite/client/table/record_view.h"
24#include "ignite/common/detail/config.h"
25
26#include <memory>
27#include <utility>
28
29namespace ignite {
30
31namespace detail {
32
33class table_impl;
34class tables_impl;
35
36} // namespace detail
37
41class table {
42 friend class detail::table_impl;
43 friend class detail::tables_impl;
44
45public:
46 // Default
47 table() = default;
48 table(table &&) noexcept = default;
49 table &operator=(table &&) noexcept = default;
50
51 // Deleted
52 table(const table &) = delete;
53 table &operator=(const table &) = delete;
54
60 [[nodiscard]] IGNITE_API const std::string &get_name() const noexcept;
61
67 [[nodiscard]] IGNITE_API const qualified_name &get_qualified_name() const noexcept;
68
74 [[nodiscard]] IGNITE_API record_view<ignite_tuple> get_record_binary_view() const noexcept;
75
84 template<typename T>
85 [[nodiscard]] record_view<T> get_record_view() const noexcept {
87 }
88
94 [[nodiscard]] IGNITE_API key_value_view<ignite_tuple, ignite_tuple> get_key_value_binary_view() const noexcept;
95
104 template<typename K, typename V>
105 [[nodiscard]] key_value_view<K, V> get_key_value_view() const noexcept {
107 }
108
109private:
115 explicit table(std::shared_ptr<detail::table_impl> impl)
116 : m_impl(std::move(impl)) {}
117
119 std::shared_ptr<detail::table_impl> m_impl;
120};
121
122} // namespace ignite
Definition key_value_view.h:488
Definition qualified_name.h:40
Definition record_view.h:469
Definition table.h:41
IGNITE_API record_view< ignite_tuple > get_record_binary_view() const noexcept
Definition table.cpp:31
key_value_view< K, V > get_key_value_view() const noexcept
Definition table.h:105
IGNITE_API const std::string & get_name() const noexcept
Definition table.cpp:23
IGNITE_API const qualified_name & get_qualified_name() const noexcept
Definition table.cpp:27
IGNITE_API key_value_view< ignite_tuple, ignite_tuple > get_key_value_binary_view() const noexcept
Definition table.cpp:35
record_view< T > get_record_view() const noexcept
Definition table.h:85