OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StringDictionaryClient.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, 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  void get_or_add_bulk(std::vector<int32_t>& string_ids,
74  const std::vector<std::string>& strings) {
75  CHECK(false);
76  };
77 
78  void get_or_add_bulk_array(std::vector<std::vector<int32_t>>& string_ids_array,
79  const std::vector<std::vector<std::string>>& strings_array);
80 
81  void populate_string_ids(std::vector<int32_t>& dest_ids,
82  const DictRef dest_dict_ref,
83  const std::vector<int32_t>& source_ids,
84  const DictRef source_dict_ref);
86  std::vector<std::vector<int32_t>>& dest_array_ids,
87  const DictRef dest_dict_ref,
88  const std::vector<std::vector<int32_t>>& source_array_ids,
89  const DictRef source_dict_ref);
90  void translate_string_ids(std::vector<int32_t>& dest_ids,
91  const DictRef dest_dict_ref,
92  const std::vector<int32_t>& source_ids,
93  const DictRef source_dict_ref,
94  const int32_t dest_generation) {
95  CHECK(false);
96  };
97 
98  bool checkpoint() {
99  CHECK(false);
100  return false;
101  };
102 };
103 
104 #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 get_or_add_bulk_array(std::vector< std::vector< int32_t >> &string_ids_array, const std::vector< std::vector< std::string >> &strings_array)
void create(const DictRef dict_ref, const bool is_temp)
void drop(const DictRef dict_ref)
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< std::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)
CHECK(cgen_state)
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)
std::vector< int32_t > get_regexp_like(const std::string &pattern, const char escape, const int64_t generation)