MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / registerSimpleDataType

Method registerSimpleDataType

src/DataTypes/DataTypeFactory.cpp:310–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310void 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
324void DataTypeFactory::registerDataTypeCustom(const String & family_name, CreatorWithCustom creator, Case case_sensitiveness, Documentation documentation)
325{

Callers 7

registerDataTypeNumbersFunction · 0.80
registerDataTypeIntervalFunction · 0.80
registerDataTypeDateFunction · 0.80
registerDataTypeUUIDFunction · 0.80
registerDataTypeNothingFunction · 0.80
registerDataTypeDate32Function · 0.80

Calls 1

ExceptionClass · 0.50

Tested by

no test coverage detected