2019-02-10 17:40:52 +00:00
|
|
|
#include <Functions/FunctionFactory.h>
|
2018-10-11 16:22:50 +00:00
|
|
|
#include <Functions/FunctionBase64Conversion.h>
|
2020-04-16 12:31:57 +00:00
|
|
|
|
2022-09-28 12:35:02 +00:00
|
|
|
#include "config.h"
|
2019-12-15 06:34:43 +00:00
|
|
|
|
2018-10-11 16:22:50 +00:00
|
|
|
#if USE_BASE64
|
2020-04-16 12:31:57 +00:00
|
|
|
# include <DataTypes/DataTypeString.h>
|
2018-10-10 01:04:07 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2022-07-04 07:01:39 +00:00
|
|
|
REGISTER_FUNCTION(Base64Encode)
|
2018-10-10 01:04:07 +00:00
|
|
|
{
|
2021-11-25 13:32:06 +00:00
|
|
|
tb64ini(0, 0);
|
2018-10-10 01:04:07 +00:00
|
|
|
factory.registerFunction<FunctionBase64Conversion<Base64Encode>>();
|
2021-01-21 20:33:15 +00:00
|
|
|
|
|
|
|
/// MysQL compatibility alias.
|
2022-08-27 21:53:51 +00:00
|
|
|
factory.registerAlias("TO_BASE64", "base64Encode", FunctionFactory::CaseInsensitive);
|
2018-10-10 01:04:07 +00:00
|
|
|
}
|
2018-10-11 16:22:50 +00:00
|
|
|
}
|
2018-11-23 18:54:23 +00:00
|
|
|
#endif
|