You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Initial commit for Encode/Decode.
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#define FUNCTOR_STR_H
|
||||
|
||||
#include "functor.h"
|
||||
#include "sql_crypt.h"
|
||||
|
||||
namespace funcexp
|
||||
{
|
||||
@ -882,6 +883,64 @@ public:
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct);
|
||||
};
|
||||
|
||||
/** @brief Func_encode class
|
||||
*/
|
||||
|
||||
class Func_encode : public Func_Str
|
||||
{
|
||||
public:
|
||||
Func_encode() : Func_Str("encode") , fSeeded(false) , fSeeds{0,0} {}
|
||||
virtual ~Func_encode() {}
|
||||
|
||||
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
|
||||
|
||||
std::string getStrVal(rowgroup::Row& row,
|
||||
FunctionParm& fp,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct);
|
||||
|
||||
void resetSeed()
|
||||
{
|
||||
fSeeded = false;
|
||||
fSeeds[0] = 0;
|
||||
fSeeds[1] = 0;
|
||||
}
|
||||
private:
|
||||
void hash_password(ulong *result, const char *password, uint password_len);
|
||||
bool fSeeded;
|
||||
SQL_CRYPT sql_crypt;
|
||||
ulong fSeeds[2];
|
||||
};
|
||||
|
||||
/** @brief Func_encode class
|
||||
*/
|
||||
|
||||
class Func_decode : public Func_Str
|
||||
{
|
||||
public:
|
||||
Func_decode() : Func_Str("decode") , fSeeded(false) , fSeeds{0,0} {}
|
||||
virtual ~Func_decode() {}
|
||||
|
||||
execplan::CalpontSystemCatalog::ColType operationType(FunctionParm& fp, execplan::CalpontSystemCatalog::ColType& resultType);
|
||||
|
||||
std::string getStrVal(rowgroup::Row& row,
|
||||
FunctionParm& fp,
|
||||
bool& isNull,
|
||||
execplan::CalpontSystemCatalog::ColType& op_ct);
|
||||
|
||||
void resetSeed()
|
||||
{
|
||||
fSeeded = false;
|
||||
fSeeds[0] = 0;
|
||||
fSeeds[1] = 0;
|
||||
}
|
||||
private:
|
||||
void hash_password(ulong *result, const char *password, uint password_len);
|
||||
bool fSeeded;
|
||||
SQL_CRYPT sql_crypt;
|
||||
ulong fSeeds[2];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user