OmniSciDB  04ee39c94c
/home/jenkins-slave/workspace/core-os-doxygen/MapDServer.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 /*
18  * @file MapDServer.h
19  * @author Alex Suhan <alex@mapd.com>
20  *
21  * Copyright (c) 2015 MapD Technologies, Inc. All rights reserved.
22  */
23 
24 #ifndef MAPDSERVER_H
25 #define MAPDSERVER_H
26 
33 
34 inline std::vector<TargetMetaInfo> target_meta_infos_from_thrift(
35  const TRowDescriptor& row_desc) {
36  std::vector<TargetMetaInfo> target_meta_infos;
37  for (const auto& col : row_desc) {
38  target_meta_infos.emplace_back(col.col_name, type_info_from_thrift(col.col_type));
39  }
40  return target_meta_infos;
41 }
42 
44  const std::vector<TColumnRange>& thrift_column_ranges);
45 
47  const std::vector<TDictionaryGeneration>& thrift_string_dictionary_generations);
48 
50  const std::vector<TTableGeneration>& table_generations);
51 
52 #endif // MAPDSERVER_H
AggregatedColRange column_ranges_from_thrift(const std::vector< TColumnRange > &thrift_column_ranges)
std::vector< TargetMetaInfo > target_meta_infos_from_thrift(const TRowDescriptor &row_desc)
Definition: MapDServer.h:34
StringDictionaryGenerations string_dictionary_generations_from_thrift(const std::vector< TDictionaryGeneration > &thrift_string_dictionary_generations)
TableGenerations table_generations_from_thrift(const std::vector< TTableGeneration > &table_generations)
Definition: MapDServer.cpp:76
SQLTypeInfo type_info_from_thrift(const TTypeInfo &thrift_ti, const bool strip_geo_encoding=false)