2018-11-25 23:24:26 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
|
|
|
#include <Functions/FunctionStringToString.h>
|
2019-06-20 15:49:54 +00:00
|
|
|
#include "domain.h"
|
2018-11-25 23:24:26 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct NameDomainWithoutWWW { static constexpr auto name = "domainWithoutWWW"; };
|
2022-10-22 11:01:33 +00:00
|
|
|
using FunctionDomainWithoutWWW = FunctionStringToString<ExtractSubstringImpl<ExtractDomain<true, false>>, NameDomainWithoutWWW>;
|
|
|
|
|
|
|
|
struct NameDomainWithoutWWWRFC { static constexpr auto name = "domainWithoutWWWRFC"; };
|
|
|
|
using FunctionDomainWithoutWWWRFC = FunctionStringToString<ExtractSubstringImpl<ExtractDomain<true, true>>, NameDomainWithoutWWWRFC>;
|
2018-11-25 23:24:26 +00:00
|
|
|
|
|
|
|
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(DomainWithoutWWW)
|
2018-11-25 23:24:26 +00:00
|
|
|
{
|
|
|
|
factory.registerFunction<FunctionDomainWithoutWWW>();
|
2022-10-22 11:01:33 +00:00
|
|
|
factory.registerFunction<FunctionDomainWithoutWWWRFC>();
|
2018-11-25 23:24:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|