OmniSciDB  21ac014ffc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColumnDescriptor.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 COLUMN_DESCRIPTOR_H
18 #define COLUMN_DESCRIPTOR_H
19 
20 #include <cassert>
21 #include <optional>
22 #include <string>
23 #include "../Shared/sqltypes.h"
24 #include "../Shared/toString.h"
25 
33  int tableId;
34  int columnId;
35  std::string columnName;
36  std::string sourceName;
38  std::string chunks;
41  std::string virtualExpr;
43  bool isGeoPhyCol{false};
44  std::optional<std::string> default_value;
45 
48  const int columnId,
49  const std::string& columnName,
50  const SQLTypeInfo columnType)
51  : tableId(tableId)
52  , columnId(columnId)
53  , columnName(columnName)
54  , sourceName(columnName)
55  , columnType(columnType)
58  , isDeletedCol(false) {}
60  this->isGeoPhyCol = isGeoPhyCol;
61  }
62 
63  std::string toString() const {
64  return ::typeName(this) + "(tableId=" + ::toString(tableId) +
65  ", columnId=" + ::toString(columnId) +
66  ", columnName=" + ::toString(columnName) +
67  ", columnType=" + ::toString(columnType) + ")";
68  }
69 };
70 
71 #endif // COLUMN_DESCRIPTOR
std::string virtualExpr
ColumnDescriptor(const int tableId, const int columnId, const std::string &columnName, const SQLTypeInfo columnType)
std::string sourceName
std::string chunks
specifies the content in-memory of a row in the column metadata table
std::optional< std::string > default_value
std::string typeName(const T *v)
Definition: toString.h:85
bool g_enable_watchdog false
Definition: Execute.cpp:75
ColumnDescriptor(const bool isGeoPhyCol)
SQLTypeInfo columnType
std::string columnName
std::string toString() const