OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UserMapping.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 OmniSci, 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 #pragma once
18 
19 #include <map>
20 #include <string>
21 #include "Catalog/ForeignServer.h"
22 
23 namespace foreign_storage {
25  static constexpr char const* USER = "USER";
26  static constexpr char const* PUBLIC = "PUBLIC";
27 };
28 
29 struct UserMapping {
30  int32_t id;
31  int32_t user_id;
33  std::string type;
34  std::string options;
35 
37 
38  UserMapping(const int32_t id,
39  const int32_t user_id,
40  const int32_t foreign_server_id,
41  const std::string type,
42  const std::string options)
43  : id(id)
44  , user_id(user_id)
45  , foreign_server_id(foreign_server_id)
46  , type(type)
47  , options(options) {}
48 
49  std::map<std::string, std::string, std::less<>> getUnencryptedOptions() const {
50  return {};
51  }
52 
53  void validate(const ForeignServer* foreign_server) {}
54 };
55 } // namespace foreign_storage
static constexpr char const * PUBLIC
Definition: UserMapping.h:26
void validate(const ForeignServer *foreign_server)
Definition: UserMapping.h:53
UserMapping(const int32_t id, const int32_t user_id, const int32_t foreign_server_id, const std::string type, const std::string options)
Definition: UserMapping.h:38
std::map< std::string, std::string, std::less<> > getUnencryptedOptions() const
Definition: UserMapping.h:49
static constexpr char const * USER
Definition: UserMapping.h:25