Apache Ignite C++ Client
Loading...
Searching...
No Matches
tables.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/table.h"
21#include "ignite/client/table/qualified_name.h"
22
23#include "ignite/common/detail/config.h"
24#include "ignite/common/ignite_result.h"
25
26#include <future>
27#include <memory>
28#include <optional>
29#include <string_view>
30
31namespace ignite {
32
33namespace detail {
34
35class tables_impl;
36
37} // namespace detail
38
39class ignite_client;
40
44class tables {
45 friend class ignite_client;
46
47public:
48 // Default
49 tables() = delete;
50
61 IGNITE_API std::optional<table> get_table(std::string_view name);
62
74 IGNITE_API void get_table_async(std::string_view name, ignite_callback<std::optional<table>> callback);
75
83 IGNITE_API std::optional<table> get_table(const qualified_name &name);
84
93 IGNITE_API void get_table_async(const qualified_name &name, ignite_callback<std::optional<table>> callback);
94
101 IGNITE_API std::vector<table> get_tables();
102
110 IGNITE_API void get_tables_async(ignite_callback<std::vector<table>> callback);
111
112private:
118 explicit tables(std::shared_ptr<detail::tables_impl> impl)
119 : m_impl(std::move(impl)) {}
120
122 std::shared_ptr<detail::tables_impl> m_impl;
123};
124
125} // namespace ignite
Definition ignite_client.h:45
Definition qualified_name.h:40
IGNITE_API void get_table_async(std::string_view name, ignite_callback< std::optional< table > > callback)
Definition tables.cpp:27
IGNITE_API void get_tables_async(ignite_callback< std::vector< table > > callback)
Definition tables.cpp:43
IGNITE_API std::vector< table > get_tables()
Definition tables.cpp:39
IGNITE_API std::optional< table > get_table(std::string_view name)
Definition tables.cpp:23