OmniSciDB  a5dc49c757
 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_i32(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<int64_t> get_like_i64(const std::string& pattern,
60  const bool icase,
61  const bool is_simple,
62  const char escape,
63  const int64_t generation) {
64  CHECK(false);
65  return std::vector<int64_t>{};
66  }
67 
68 
69  std::vector<int32_t> get_compare(const std::string& pattern,
70  const std::string& comp_operator,
71  const int64_t generation) {
72  CHECK(false);
73  return std::vector<int32_t>{};
74  };
75 
76  std::vector<int32_t> get_regexp_like(const std::string& pattern,
77  const char escape,
78  const int64_t generation) {
79  CHECK(false);
80  return std::vector<int32_t>{};
81  };
82 
83  template <class String>
84  void get_bulk(std::vector<int32_t>& string_ids, const std::vector<String>& strings);
85 
86  template <class String>
87  void get_or_add_bulk(std::vector<int32_t>& string_ids,
88  const std::vector<String>& strings) {
89  CHECK(false);
90  };
91 
92  template <class String>
93  void get_or_add_bulk_array(std::vector<std::vector<int32_t>>& string_ids_array,
94  const std::vector<std::vector<String>>& strings_array) {
95  CHECK(false);
96  }
97 
98  void populate_string_ids(std::vector<int32_t>& dest_ids,
99  const DictRef dest_dict_ref,
100  const std::vector<int32_t>& source_ids,
101  const DictRef source_dict_ref);
103  std::vector<std::vector<int32_t>>& dest_array_ids,
104  const DictRef dest_dict_ref,
105  const std::vector<std::vector<int32_t>>& source_array_ids,
106  const DictRef source_dict_ref);
107  void translate_string_ids(std::vector<int32_t>& dest_ids,
108  const DictRef dest_dict_ref,
109  const std::vector<int32_t>& source_ids,
110  const DictRef source_dict_ref,
111  const int32_t dest_generation) {
112  CHECK(false);
113  };
114 
115  bool checkpoint() {
116  CHECK(false);
117  return false;
118  };
119 };
120 
121 #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)
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< int64_t > get_like_i64(const std::string &pattern, const bool icase, const bool is_simple, const char escape, const int64_t generation)
std::vector< int32_t > get_like_i32(const std::string &pattern, const bool icase, const bool is_simple, const char escape, const int64_t generation)
std::vector< int32_t > get_regexp_like(const std::string &pattern, const char escape, const int64_t generation)