OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Types.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 #pragma once
18 
19 #include <map>
20 #include <string>
21 #include <tuple>
22 #include <unordered_map>
23 
27 #include "Catalog/DictDescriptor.h"
28 #include "Catalog/ForeignServer.h"
29 #include "Catalog/LinkDescriptor.h"
31 
32 namespace Catalog_Namespace {
33 
34 using TableDescriptorMap = std::map<std::string, TableDescriptor*>;
35 using TableDescriptorMapById = std::map<int, TableDescriptor*>;
36 using LogicalToPhysicalTableMapById = std::map<int32_t, std::vector<int32_t>>;
37 using ColumnKey = std::tuple<int, std::string>;
38 using ColumnDescriptorMap = std::map<ColumnKey, ColumnDescriptor*>;
39 using ColumnIdKey = std::tuple<int, int>;
40 using ColumnDescriptorMapById = std::map<ColumnIdKey, ColumnDescriptor*>;
41 using TableDictColumnsMap = std::map<int32_t, std::set<const ColumnDescriptor*>>;
42 using DictDescriptorMapById = std::map<DictRef, std::unique_ptr<DictDescriptor>>;
44  std::map<std::string, std::shared_ptr<DashboardDescriptor>>;
45 using LinkDescriptorMap = std::map<std::string, LinkDescriptor*>;
46 using LinkDescriptorMapById = std::map<int, LinkDescriptor*>;
48  std::unordered_map<const TableDescriptor*, const ColumnDescriptor*>;
49 using ForeignServerMap =
50  std::map<std::string, std::shared_ptr<foreign_storage::ForeignServer>>;
52  std::map<int, std::shared_ptr<foreign_storage::ForeignServer>>;
53 using CustomExpressionMapById = std::map<int, std::unique_ptr<CustomExpression>>;
54 } // namespace Catalog_Namespace
std::unordered_map< const TableDescriptor *, const ColumnDescriptor * > DeletedColumnPerTableMap
Definition: Types.h:48
std::tuple< int, std::string > ColumnKey
Definition: Types.h:37
std::map< ColumnKey, ColumnDescriptor * > ColumnDescriptorMap
Definition: Types.h:38
std::map< int32_t, std::vector< int32_t >> LogicalToPhysicalTableMapById
Definition: Types.h:36
std::map< int, std::unique_ptr< CustomExpression >> CustomExpressionMapById
Definition: Types.h:53
std::map< ColumnIdKey, ColumnDescriptor * > ColumnDescriptorMapById
Definition: Types.h:40
std::map< int, TableDescriptor * > TableDescriptorMapById
Definition: Types.h:35
std::map< std::string, LinkDescriptor * > LinkDescriptorMap
Definition: Types.h:45
std::map< std::string, std::shared_ptr< foreign_storage::ForeignServer >> ForeignServerMap
Definition: Types.h:50
std::map< DictRef, std::unique_ptr< DictDescriptor >> DictDescriptorMapById
Definition: Types.h:42
std::map< std::string, std::shared_ptr< DashboardDescriptor >> DashboardDescriptorMap
Definition: Types.h:44
std::map< int32_t, std::set< const ColumnDescriptor * >> TableDictColumnsMap
Definition: Types.h:41
std::map< int, LinkDescriptor * > LinkDescriptorMapById
Definition: Types.h:46
std::map< int, std::shared_ptr< foreign_storage::ForeignServer >> ForeignServerMapById
Definition: Types.h:52
std::map< std::string, TableDescriptor * > TableDescriptorMap
Definition: Types.h:34
std::tuple< int, int > ColumnIdKey
Definition: Types.h:39