1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -40,14 +40,16 @@ DMLColumn::DMLColumn(std::string name, std::string value, bool isFromCol, uint32
{
fName = name;
fData = value;
if (( strcasecmp(value.c_str(), "NULL") == 0) || (value.length() == 0) )
{
isNULL = true;
}
isNULL = true;
}
fisNULL = isNULL;
fIsFromCol = isFromCol;
fFuncScale = funcScale;
fIsFromCol = isFromCol;
fFuncScale = funcScale;
}
DMLColumn::DMLColumn(std::string name, std::vector<std::string>& valueList, bool isFromCol, uint32_t funcScale, bool isNULL)
@ -55,8 +57,8 @@ DMLColumn::DMLColumn(std::string name, std::vector<std::string>& valueList, bool
fName = name;
fColValuesList = valueList;
fisNULL = isNULL;
fIsFromCol = isFromCol;
fFuncScale = funcScale;
fIsFromCol = isFromCol;
fFuncScale = funcScale;
}
DMLColumn::~DMLColumn()
@ -66,30 +68,32 @@ int DMLColumn::read(messageqcpp::ByteStream& bytestream)
{
int retval = 1;
bytestream >> fName;
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fisNULL);
uint32_t vectorSize;
bytestream >> vectorSize;
if (vectorSize > 0 )
{
for ( uint32_t i = 0; i < vectorSize; i++ )
{
std::string dataStr;
bytestream >> dataStr;
// if ( !fisNULL && (dataStr.length() == 0 ))
// dataStr = (char) 0;
fColValuesList.push_back( dataStr);
}
}
else
bytestream >> fData; //deprecated.
if ( (fColValuesList.size() <1) && (fColValuesList.size() > 0) ) //deprecated.
fData =fColValuesList[0] ; //deprecated.
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fisNULL);
uint32_t vectorSize;
bytestream >> vectorSize;
if (vectorSize > 0 )
{
for ( uint32_t i = 0; i < vectorSize; i++ )
{
std::string dataStr;
bytestream >> dataStr;
// if ( !fisNULL && (dataStr.length() == 0 ))
// dataStr = (char) 0;
fColValuesList.push_back( dataStr);
}
}
else
bytestream >> fData; //deprecated.
if ( (fColValuesList.size() < 1) && (fColValuesList.size() > 0) ) //deprecated.
fData = fColValuesList[0] ; //deprecated.
//bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fisNULL);
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsFromCol);
bytestream >> (uint32_t&) fFuncScale;
bytestream >> reinterpret_cast<messageqcpp::ByteStream::byte&>(fIsFromCol);
bytestream >> (uint32_t&) fFuncScale;
return retval;
}
@ -97,22 +101,24 @@ int DMLColumn::write(messageqcpp::ByteStream& bytestream)
{
int retval = 1;
bytestream << fName;
bytestream << static_cast<uint8_t>(fisNULL);
uint32_t vectorSize = fColValuesList.size();
bytestream << vectorSize;
if (vectorSize > 0 )
{
for ( uint32_t i = 0; i < vectorSize; i++ )
{
bytestream << fColValuesList[i];
}
}
else
bytestream << fData; //deprecated.
bytestream << static_cast<uint8_t>(fisNULL);
uint32_t vectorSize = fColValuesList.size();
bytestream << vectorSize;
if (vectorSize > 0 )
{
for ( uint32_t i = 0; i < vectorSize; i++ )
{
bytestream << fColValuesList[i];
}
}
else
bytestream << fData; //deprecated.
//bytestream << static_cast<uint8_t>(fisNULL);
bytestream << static_cast<uint8_t>(fIsFromCol);
bytestream <<(uint32_t)fFuncScale;
bytestream << static_cast<uint8_t>(fIsFromCol);
bytestream << (uint32_t)fFuncScale;
return retval;
}