| 19 | |
| 20 | |
| 21 | void TableFunctionFactory::registerFunction(const std::string & name, Value creator, CaseSensitiveness case_sensitiveness) |
| 22 | { |
| 23 | if (!table_functions.emplace(name, creator).second) |
| 24 | throw Exception("TableFunctionFactory: the table function name '" + name + "' is not unique", |
| 25 | ErrorCodes::LOGICAL_ERROR); |
| 26 | |
| 27 | if (case_sensitiveness == CaseInsensitive |
| 28 | && !case_insensitive_table_functions.emplace(Poco::toLower(name), creator).second) |
| 29 | throw Exception("TableFunctionFactory: the case insensitive table function name '" + name + "' is not unique", |
| 30 | ErrorCodes::LOGICAL_ERROR); |
| 31 | |
| 32 | KnownTableFunctionNames::instance().add(name, (case_sensitiveness == CaseInsensitive)); |
| 33 | } |
| 34 | |
| 35 | TableFunctionPtr TableFunctionFactory::get( |
| 36 | const ASTPtr & ast_function, |
no test coverage detected