OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringDictionaryClient.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (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  * http://www.apache.org/licenses/LICENSE-2.0
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 
17 #ifndef STRINGDICTIONARY_STRINGDICTIONARYCLIENT_H
18 #define STRINGDICTIONARY_STRINGDICTIONARYCLIENT_H
19 
20 #include "DictRef.h"
21 #include "LeafHostInfo.h"
22 
23 #include <memory>
24 #include <mutex>
25 
27  public:
29  const DictRef dict_id,
30  const bool with_timeout) {
31  CHECK(false);
32  };
33 
34  void create(const DictRef dict_ref, const bool is_temp) { CHECK(false); };
35 
36  void drop(const DictRef dict_ref) { CHECK(false); };
37 
38  int32_t get(const std::string& str) {
39  CHECK(false);
40  return 0;
41  };
42 
43  void get_string(std::string& _return, const int32_t string_id) { CHECK(false); };
44 
45  int64_t storage_entry_count() {
46  CHECK(false);
47  return 0;
48  };
49 
50  std::vector<int32_t> get_like(const std::string& pattern,
51  const bool icase,
52  const bool is_simple,
53  const char escape,
54  const int64_t generation) {
55  CHECK(false);
56  return std::vector<int32_t>{};
57  };
58 
59  std::vector<int32_t> get_compare(const std::string& pattern,
60  const std::string& comp_operator,
61  const int64_t generation) {
62  CHECK(false);
63  return std::vector<int32_t>{};
64  };
65 
66  std::vector<int32_t> get_regexp_like(const std::string& pattern,
67  const char escape,
68  const int64_t generation) {
69  CHECK(false);
70  return std::vector<int32_t>{};
71  };
72 
73  template <class String>
74  void get_bulk(std::vector<int32_t>& string_ids, const std::vector<String>& strings);
75 
76  template <class String>
77  void get_or_add_bulk(std::vector<int32_t>& string_ids,
78  const std::vector<String>& strings) {
79  CHECK(false);
80  };
81 
82  template <class String>
83  void get_or_add_bulk_array(std::vector<std::vector<int32_t>>& string_ids_array,
84  const std::vector<std::vector<String>>& strings_array) {
85  CHECK(false);
86  }
87 
88  void populate_string_ids(std::vector<int32_t>& dest_ids,
89  const DictRef dest_dict_ref,
90  const std::vector<int32_t>& source_ids,
91  const DictRef source_dict_ref);
93  std::vector<std::vector<int32_t>>& dest_array_ids,
94  const DictRef dest_dict_ref,
95  const std::vector<std::vector<int32_t>>& source_array_ids,
96  const DictRef source_dict_ref);
97  void translate_string_ids(std::vector<int32_t>& dest_ids,
98  const DictRef dest_dict_ref,
99  const std::vector<int32_t>& source_ids,
100  const DictRef source_dict_ref,
101  const int32_t dest_generation) {
102  CHECK(false);
103  };
104 
105  bool checkpoint() {
106  CHECK(false);
107  return false;
108  };
109 };
110 
111 #endif // STRINGDICTIONARY_STRINGDICTIONARYCLIENT_H
void translate_string_ids(std::vector< int32_t > &dest_ids, const DictRef dest_dict_ref, const std::vector< int32_t > &source_ids, const DictRef source_dict_ref, const int32_t dest_generation)
void create(const DictRef dict_ref, const bool is_temp)
void drop(const DictRef dict_ref)
void get_or_add_bulk_array(std::vector< std::vector< int32_t >> &string_ids_array, const std::vector< std::vector< String >> &strings_array)
void get_string(std::string &_return, const int32_t string_id)
std::vector< int32_t > get_compare(const std::string &pattern, const std::string &comp_operator, const int64_t generation)
void get_or_add_bulk(std::vector< int32_t > &string_ids, const std::vector< String > &strings)
void populate_string_ids(std::vector< int32_t > &dest_ids, const DictRef dest_dict_ref, const std::vector< int32_t > &source_ids, const DictRef source_dict_ref)
StringDictionaryClient(const LeafHostInfo &server_host, const DictRef dict_id, const bool with_timeout)
std::vector< int32_t > get_like(const std::string &pattern, const bool icase, const bool is_simple, const char escape, const int64_t generation)
void populate_string_array_ids(std::vector< std::vector< int32_t >> &dest_array_ids, const DictRef dest_dict_ref, const std::vector< std::vector< int32_t >> &source_array_ids, const DictRef source_dict_ref)
void get_bulk(std::vector< int32_t > &string_ids, const std::vector< String > &strings)
#define CHECK(condition)
Definition: Logger.h:291
std::vector< int32_t > get_regexp_like(const std::string &pattern, const char escape, const int64_t generation)