| 308 | } |
| 309 | |
| 310 | void DataTypeFactory::registerSimpleDataType(const String & name, SimpleCreator creator, Case case_sensitiveness, Documentation documentation) |
| 311 | { |
| 312 | if (creator == nullptr) |
| 313 | throw Exception(ErrorCodes::LOGICAL_ERROR, "DataTypeFactory: the data type {} has been provided a null constructor", |
| 314 | name); |
| 315 | |
| 316 | registerDataType(name, [name, creator](const ASTPtr & ast) |
| 317 | { |
| 318 | if (ast) |
| 319 | throw Exception(ErrorCodes::DATA_TYPE_CANNOT_HAVE_ARGUMENTS, "Data type {} cannot have arguments", name); |
| 320 | return creator(); |
| 321 | }, case_sensitiveness, std::move(documentation)); |
| 322 | } |
| 323 | |
| 324 | void DataTypeFactory::registerDataTypeCustom(const String & family_name, CreatorWithCustom creator, Case case_sensitiveness, Documentation documentation) |
| 325 | { |
no test coverage detected