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
Reformat all code to coding standard
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
#include <iostream>
|
||||
@ -47,97 +47,97 @@ namespace WriteEngine
|
||||
{
|
||||
|
||||
/** Class Convertor */
|
||||
class Convertor
|
||||
class Convertor
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Default Constructor
|
||||
*/
|
||||
Convertor(){}
|
||||
/**
|
||||
* @brief Default Constructor
|
||||
*/
|
||||
Convertor() {}
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~Convertor(){}
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~Convertor() {}
|
||||
|
||||
/**
|
||||
* @brief Get date/time string based on current date and time
|
||||
*/
|
||||
/**
|
||||
* @brief Get date/time string based on current date and time
|
||||
*/
|
||||
EXPORT static const std::string getTimeStr();
|
||||
|
||||
/**
|
||||
* @brief Convert specified integer value to a string
|
||||
*
|
||||
* @param val Integer value to be converted to a string
|
||||
*/
|
||||
/**
|
||||
* @brief Convert specified integer value to a string
|
||||
*
|
||||
* @param val Integer value to be converted to a string
|
||||
*/
|
||||
EXPORT static const std::string int2Str(int val);
|
||||
|
||||
/**
|
||||
* @brief Convert an oid to a full file name (with partition and segment
|
||||
* being included in the filename). This is used for all column and
|
||||
* dictionary store db files. If dealing with a version buffer file,
|
||||
* a partition and segment number of 0 should be used.
|
||||
*/
|
||||
/**
|
||||
* @brief Convert an oid to a full file name (with partition and segment
|
||||
* being included in the filename). This is used for all column and
|
||||
* dictionary store db files. If dealing with a version buffer file,
|
||||
* a partition and segment number of 0 should be used.
|
||||
*/
|
||||
EXPORT static int oid2FileName(FID fid, char* fullFileName,
|
||||
char dbDirName[][MAX_DB_DIR_NAME_SIZE],
|
||||
uint32_t partition, uint16_t segment);
|
||||
char dbDirName[][MAX_DB_DIR_NAME_SIZE],
|
||||
uint32_t partition, uint16_t segment);
|
||||
|
||||
/**
|
||||
* @brief Convert specified errno to associated error msg string
|
||||
*
|
||||
* @param errNum System errno to be converted.
|
||||
* @param errString Error msg string associated with the specified errno.
|
||||
*/
|
||||
/**
|
||||
* @brief Convert specified errno to associated error msg string
|
||||
*
|
||||
* @param errNum System errno to be converted.
|
||||
* @param errString Error msg string associated with the specified errno.
|
||||
*/
|
||||
EXPORT static void mapErrnoToString(int errNum, std::string& errString);
|
||||
|
||||
/**
|
||||
* @brief Convert specified ColDataType to internal storage type (ColType)
|
||||
*
|
||||
* @param dataType Interface data-type
|
||||
* @param internalType Internal data-type used for storing
|
||||
*/
|
||||
/**
|
||||
* @brief Convert specified ColDataType to internal storage type (ColType)
|
||||
*
|
||||
* @param dataType Interface data-type
|
||||
* @param internalType Internal data-type used for storing
|
||||
*/
|
||||
//BUG931
|
||||
EXPORT static void convertColType(execplan::CalpontSystemCatalog::ColDataType dataType,
|
||||
ColType& internalType, bool isToken=false);
|
||||
/**
|
||||
* @brief Convert specified internal storage type (ColType) to
|
||||
* ColDataType
|
||||
*
|
||||
* @param internalType Internal data-type used for storing
|
||||
* @param dataType Interface data-type
|
||||
*/
|
||||
EXPORT static void convertWEColType(ColType internalType,
|
||||
execplan::CalpontSystemCatalog::ColDataType& dataType);
|
||||
ColType& internalType, bool isToken = false);
|
||||
/**
|
||||
* @brief Convert specified internal storage type (ColType) to
|
||||
* ColDataType
|
||||
*
|
||||
* @param internalType Internal data-type used for storing
|
||||
* @param dataType Interface data-type
|
||||
*/
|
||||
EXPORT static void convertWEColType(ColType internalType,
|
||||
execplan::CalpontSystemCatalog::ColDataType& dataType);
|
||||
|
||||
/**
|
||||
* @brief Convert interface column type to a internal column type.
|
||||
* curStruct is interpreted as a ColStruct.
|
||||
*/
|
||||
/**
|
||||
* @brief Convert interface column type to a internal column type.
|
||||
* curStruct is interpreted as a ColStruct.
|
||||
*/
|
||||
EXPORT static void convertColType(ColStruct* curStruct);
|
||||
|
||||
/*
|
||||
* @brief Get the correct width for a row
|
||||
*/
|
||||
/*
|
||||
* @brief Get the correct width for a row
|
||||
*/
|
||||
EXPORT static int getCorrectRowWidth( execplan::CalpontSystemCatalog::ColDataType dataType, int width );
|
||||
|
||||
/*
|
||||
* @brief Convert a Decimal string to it's equivalent integer value.
|
||||
* errno can be checked upon return to see if input value was
|
||||
* out of range (ERANGE).
|
||||
*
|
||||
* field decimal string to be converted
|
||||
* fieldLengh length of "field" in bytes
|
||||
* scale decimal scale to be applied to value
|
||||
*/
|
||||
/*
|
||||
* @brief Convert a Decimal string to it's equivalent integer value.
|
||||
* errno can be checked upon return to see if input value was
|
||||
* out of range (ERANGE).
|
||||
*
|
||||
* field decimal string to be converted
|
||||
* fieldLengh length of "field" in bytes
|
||||
* scale decimal scale to be applied to value
|
||||
*/
|
||||
EXPORT static long long convertDecimalString ( const char* field,
|
||||
int fieldLength,
|
||||
int scale );
|
||||
int fieldLength,
|
||||
int scale );
|
||||
|
||||
private:
|
||||
|
||||
struct dmFilePathArgs_t;
|
||||
static int dmOid2FPath(uint32_t oid, uint32_t partition, uint32_t segment,
|
||||
dmFilePathArgs_t* pArgs);
|
||||
struct dmFilePathArgs_t;
|
||||
static int dmOid2FPath(uint32_t oid, uint32_t partition, uint32_t segment,
|
||||
dmFilePathArgs_t* pArgs);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user