MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / ConvertType

Method ConvertType

src/codec/schema_codec.h:128–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 }
127
128 static ::fedb::codec::ColType ConvertType(const std::string& raw_type) {
129 ::fedb::codec::ColType type;
130 if (raw_type == "int32") {
131 type = ::fedb::codec::ColType::kInt32;
132 } else if (raw_type == "int64") {
133 type = ::fedb::codec::ColType::kInt64;
134 } else if (raw_type == "uint32") {
135 type = ::fedb::codec::ColType::kUInt32;
136 } else if (raw_type == "uint64") {
137 type = ::fedb::codec::ColType::kUInt64;
138 } else if (raw_type == "float") {
139 type = ::fedb::codec::ColType::kFloat;
140 } else if (raw_type == "double") {
141 type = ::fedb::codec::ColType::kDouble;
142 } else if (raw_type == "string") {
143 type = ::fedb::codec::ColType::kString;
144 } else if (raw_type == "timestamp") {
145 type = ::fedb::codec::ColType::kTimestamp;
146 } else if (raw_type == "int16") {
147 type = ::fedb::codec::ColType::kInt16;
148 } else if (raw_type == "uint16") {
149 type = ::fedb::codec::ColType::kUInt16;
150 } else if (raw_type == "bool") {
151 type = ::fedb::codec::ColType::kBool;
152 } else if (raw_type == "date") {
153 type = ::fedb::codec::ColType::kDate;
154 } else {
155 type = ::fedb::codec::ColType::kUnknown;
156 }
157 return type;
158 }
159
160 static hybridse::type::Type ConvertType(fedb::type::DataType type) {
161 switch (type) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected