MeteoIODoc 2.11.0
SQL_FIELD Class Reference

#include <libMysqlWrapper.h>

Public Types

enum  unitsConversions {
  NONE =0 , C_TO_K , CM_TO_M , NORMALIZE_PC ,
  HPA_TO_PA
}
 
typedef my_bool BOOL_TYPE
 

Public Member Functions

 SQL_FIELD (const std::string &i_param, const enum_field_types &type, const unsigned int &i_processing=0)
 
 SQL_FIELD (const std::string &i_str, const std::string &i_param="", const unsigned int &i_processing=0)
 
 SQL_FIELD (const mio::Date &i_dt, const std::string &i_param="", const unsigned int &i_processing=0)
 
void resetDate ()
 
void reset ()
 
void setFromDate (const mio::Date &i_dt, MYSQL_TIME &ts)
 
void setString (const std::string &i_str)
 
void setDate (const mio::Date &i_dt)
 
void setDouble (const double &i_val)
 
mio::Date getDate (const double &TZ) const
 

Public Attributes

std::string param
 the parameter name for MeteoIO More...
 
char str [MYSQL_STRING_SIZE]
 for MySQL to store string data More...
 
MYSQL_TIME dt
 for MySQL to store datetime data More...
 
unsigned long int str_len
 for MySQL, length of a string More...
 
unsigned long int buffer_len
 for MySQL, allocated data buffer length More...
 
double val
 for MySQL to store double data More...
 
unsigned int processing
 what kind of corrections to apply to the raw data (such as C to K conversion, etc More...
 
BOOL_TYPE is_null
 
BOOL_TYPE error
 for MySQL ro report a NULL value or errors More...
 
bool isDate
 for MeteoIO to quickly identify datetime fields More...
 
enum_field_types MysqlType
 for MySQL, data type of the field (see mysql/field_types.h) More...
 

Member Typedef Documentation

◆ BOOL_TYPE

typedef my_bool SQL_FIELD::BOOL_TYPE

Member Enumeration Documentation

◆ unitsConversions

Enumerator
NONE 
C_TO_K 
CM_TO_M 
NORMALIZE_PC 
HPA_TO_PA 

Constructor & Destructor Documentation

◆ SQL_FIELD() [1/3]

SQL_FIELD::SQL_FIELD ( const std::string &  i_param,
const enum_field_types &  type,
const unsigned int &  i_processing = 0 
)

◆ SQL_FIELD() [2/3]

SQL_FIELD::SQL_FIELD ( const std::string &  i_str,
const std::string &  i_param = "",
const unsigned int &  i_processing = 0 
)

◆ SQL_FIELD() [3/3]

SQL_FIELD::SQL_FIELD ( const mio::Date i_dt,
const std::string &  i_param = "",
const unsigned int &  i_processing = 0 
)

Member Function Documentation

◆ getDate()

mio::Date SQL_FIELD::getDate ( const double &  TZ) const

◆ reset()

void SQL_FIELD::reset ( )

◆ resetDate()

void SQL_FIELD::resetDate ( )

◆ setDate()

void SQL_FIELD::setDate ( const mio::Date i_dt)

◆ setDouble()

void SQL_FIELD::setDouble ( const double &  i_val)

◆ setFromDate()

void SQL_FIELD::setFromDate ( const mio::Date i_dt,
MYSQL_TIME &  ts 
)

◆ setString()

void SQL_FIELD::setString ( const std::string &  i_str)

Member Data Documentation

◆ buffer_len

unsigned long int SQL_FIELD::buffer_len

for MySQL, allocated data buffer length

◆ dt

MYSQL_TIME SQL_FIELD::dt

for MySQL to store datetime data

◆ error

BOOL_TYPE SQL_FIELD::error

for MySQL ro report a NULL value or errors

◆ is_null

BOOL_TYPE SQL_FIELD::is_null

◆ isDate

bool SQL_FIELD::isDate

for MeteoIO to quickly identify datetime fields

◆ MysqlType

enum_field_types SQL_FIELD::MysqlType

for MySQL, data type of the field (see mysql/field_types.h)

◆ param

std::string SQL_FIELD::param

the parameter name for MeteoIO

◆ processing

unsigned int SQL_FIELD::processing

what kind of corrections to apply to the raw data (such as C to K conversion, etc

◆ str

char SQL_FIELD::str[MYSQL_STRING_SIZE]

for MySQL to store string data

◆ str_len

unsigned long int SQL_FIELD::str_len

for MySQL, length of a string

◆ val

double SQL_FIELD::val

for MySQL to store double data


The documentation for this class was generated from the following files: