Try to fix base64Url functions registration

This commit is contained in:
Mikhail Gorshkov 2024-06-10 12:16:03 +00:00
parent 0da0d8dfb1
commit 9e538b70bb
6 changed files with 3 additions and 42 deletions

View File

@ -8,6 +8,7 @@ namespace DB
REGISTER_FUNCTION(Base64Decode)
{
factory.registerFunction<FunctionBase64Conversion<Base64Decode<Base64Variant::Normal>>>();
factory.registerFunction<FunctionBase64Conversion<Base64Decode<Base64Variant::Url>>>();
/// MySQL compatibility alias.
factory.registerAlias("FROM_BASE64", "base64Decode", FunctionFactory::CaseInsensitive);

View File

@ -8,6 +8,7 @@ namespace DB
REGISTER_FUNCTION(Base64Encode)
{
factory.registerFunction<FunctionBase64Conversion<Base64Encode<Base64Variant::Normal>>>();
factory.registerFunction<FunctionBase64Conversion<Base64Encode<Base64Variant::Url>>>();
/// MySQL compatibility alias.
factory.registerAlias("TO_BASE64", "base64Encode", FunctionFactory::CaseInsensitive);

View File

@ -1,14 +0,0 @@
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <Functions/FunctionFactory.h>
namespace DB
{
REGISTER_FUNCTION(Base64UrlDecode)
{
factory.registerFunction<FunctionBase64Conversion<Base64Decode<Base64Variant::Url>>>();
}
}
#endif

View File

@ -1,14 +0,0 @@
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <Functions/FunctionFactory.h>
namespace DB
{
REGISTER_FUNCTION(Base64UrlEncode)
{
factory.registerFunction<FunctionBase64Conversion<Base64Encode<Base64Variant::Url>>>();
}
}
#endif

View File

@ -8,6 +8,7 @@ namespace DB
REGISTER_FUNCTION(TryBase64Decode)
{
factory.registerFunction<FunctionBase64Conversion<TryBase64Decode<Base64Variant::Normal>>>();
factory.registerFunction<FunctionBase64Conversion<TryBase64Decode<Base64Variant::Url>>>();
}
}

View File

@ -1,14 +0,0 @@
#include <Functions/FunctionBase64Conversion.h>
#if USE_BASE64
#include <Functions/FunctionFactory.h>
namespace DB
{
REGISTER_FUNCTION(TryBase64UrlDecode)
{
factory.registerFunction<FunctionBase64Conversion<TryBase64Decode<Base64Variant::Url>>>();
}
}
#endif