| 198 | } |
| 199 | |
| 200 | void DataTypeFactory::registerSimpleDataType(const String & name, SimpleCreator creator, CaseSensitiveness case_sensitiveness) |
| 201 | { |
| 202 | if (creator == nullptr) |
| 203 | throw Exception("DataTypeFactory: the data type " + name + " has been provided " |
| 204 | " a null constructor", ErrorCodes::LOGICAL_ERROR); |
| 205 | |
| 206 | registerDataType(name, [name, creator](const ASTPtr & ast) |
| 207 | { |
| 208 | if (ast) |
| 209 | throw Exception("Data type " + name + " cannot have arguments", ErrorCodes::DATA_TYPE_CANNOT_HAVE_ARGUMENTS); |
| 210 | return creator(); |
| 211 | }, case_sensitiveness); |
| 212 | } |
| 213 | |
| 214 | void DataTypeFactory::registerDataTypeCustom(const String & family_name, CreatorWithCustom creator, CaseSensitiveness case_sensitiveness) |
| 215 | { |
no test coverage detected