ATLAS Offline Software
|
#include <GenericDbTable.h>
Classes | |
struct | CondDBColumn |
Definition of the columns. More... | |
struct | CondDBColumnArrayBool |
struct | CondDBColumnArrayDouble |
struct | CondDBColumnArrayFloat |
struct | CondDBColumnArrayInt |
struct | CondDBColumnArrayLong |
struct | CondDBColumnArrayString |
struct | CondDBColumnBool |
struct | CondDBColumnDouble |
struct | CondDBColumnFloat |
struct | CondDBColumnInt |
struct | CondDBColumnLong |
struct | CondDBColumnString |
Public Types | |
enum | dataTypes { kNull =0, kBool, kInt, kFloat, kString, kDouble, kLongLong, kArrayBool, kArrayFloat, kArrayInt, kArrayString, kArrayDouble, kArrayLongLong } |
enum | CondDBErrorCode { CDB_NOT_INITIALIZED = -1, CDB_RANGE_ERROR = -2, CDB_TYPE_ERROR = -3, CDB_SUCCESS = -4, CDB_ALLOC_ERROR = -5, CDB_STRTOARRAY_ERROR = -6 } |
Public Member Functions | |
GenericDbTable () | |
Default constructor. More... | |
GenericDbTable (unsigned n_columns, int n_rows=0) | |
Default constructor. More... | |
~GenericDbTable () | |
Object destructor. More... | |
int | getNames (std::vector< std::string > &names) const |
This method gets a vector containing the names of all columns in the table. More... | |
int | getTypes (std::vector< dataTypes > &types) const |
This method gets a vector containing the data types of all columns in the table. More... | |
int | getNull (unsigned n_column, float &null) const |
Get Null value for column. More... | |
int | getNull (unsigned n_column, long int &null) const |
int | getNull (unsigned n_column, int64 &null) const |
int | getNull (unsigned n_column, double &null) const |
int | getNull (unsigned n_column, std::string &null) const |
int | setName (unsigned n_column, const std::string &name) |
This method defines the name for a specified column. More... | |
int | setType (unsigned n_column, dataTypes type) |
This method defines the data type for a specified column. More... | |
int | setNull (unsigned n_column, const float &null) |
Set Null value for column. More... | |
int | setNull (unsigned n_column, const long int &null) |
int | setNull (unsigned n_column, const int64 &null) |
int | setNull (unsigned n_column, const double &null) |
int | setNull (unsigned n_column, const std::string &null) |
void | Initialize (unsigned n_columns, int n_rows=0) |
This method initializes a table created by the default constructor If the table had the number of columns already defined this does nothing. More... | |
int | getRow (unsigned rowNumber, std::vector< std::string > &values) const |
This method returns a vector of strings with allelements in a row In case the cell has an array the first string has the number of elements (following strings) belonging to the array. More... | |
int | getRowID (std::string &pID) const |
This method returns, for a given ID, the row number. More... | |
int | getCell (unsigned n_column, unsigned n_row, short int &ndata) const |
This method gets a value from a cell in a column of long ints (int in MySQL) More... | |
int | getCell (unsigned n_column, unsigned n_row, long int &ndata) const |
This method gets a value from a cell in a column of long ints (int in MySQL) More... | |
int | getCell (unsigned n_column, unsigned n_row, int64 &ndata) const |
This method gets a value from a cell in a column of long long ints (bigint in MySQL) More... | |
int | getCell (unsigned n_column, unsigned n_row, float &ndata) const |
This method gets a value from a cell in a column of floats. More... | |
int | getCell (unsigned n_column, unsigned n_row, std::string &ndata) const |
This method gets a value from a cell in a column of strings. More... | |
int | getCell (unsigned n_column, unsigned n_row, double &ndata) const |
This method gets a value from a cell in a column of doubles. More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< short int > &ndata) const |
This method gets a value from a cell in a column of vectors of bools. More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< long int > &ndata) const |
This method gets a value from a cell in a column of vectors of long ints (int in MySQL - 4bytes) More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< int64 > &ndata) const |
This method gets a value from a cell in a column of vectors of long long ints (bigint in MySQL - 8bytes) More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< float > &ndata) const |
This method gets a value from a cell in a column of vectors of floats. More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< std::string > &ndata) const |
This method gets a value from a cell in a column of vector of strings. More... | |
int | getCell (unsigned n_column, unsigned n_row, std::vector< double > &ndata) const |
This method gets a value from a cell in a column of vector of doubles. More... | |
int | getCell (const std::string &colName, unsigned int n_row, short int &data) const |
This method get's a value from a column of floats by its name instead the column number (. More... | |
int | getCell (const std::string &colName, unsigned int n_row, long int &data) const |
int | getCell (const std::string &colName, unsigned int n_row, int64 &data) const |
int | getCell (const std::string &colName, unsigned int n_row, float &data) const |
int | getCell (const std::string &colName, unsigned int n_row, double &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::string &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< short int > &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< long int > &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< int64 > &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< float > &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< double > &data) const |
int | getCell (const std::string &colName, unsigned int n_row, std::vector< std::string > &data) const |
int | setCell (unsigned n_column, unsigned n_row, const short int ndata) |
set data methods More... | |
int | setCell (unsigned n_column, unsigned n_row, const long int ndata) |
This method changes a value from a cell in a column of long ints. More... | |
int | setCell (unsigned n_column, unsigned n_row, const int64 ndata) |
This method changes a value from a cell in a column of long long ints. More... | |
int | setCell (unsigned n_column, unsigned n_row, const float ndata) |
This method changes a value from a cell in a column of floats. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::string &ndata) |
This method changes a value from a cell in a column of strings. More... | |
int | setCell (unsigned n_column, unsigned n_row, const double ndata) |
This method changes a value from a cell in a column of doubles. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< short int > &ndata) |
This method changes a value from a cell in a column of vectors of bools. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< long int > &ndata) |
This method changes a value from a cell in a column of vectors of long ints. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< int64 > &ndata) |
This method changes a value from a cell in a column of vectors of long long ints. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< float > &ndata) |
This method changes a value from a cell in a column of vectors of floats. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< std::string > &ndata) |
This method changes a value from a cell in a column of vectors of strings. More... | |
int | setCell (unsigned n_column, unsigned n_row, const std::vector< double > &ndata) |
This method changes a value from a cell in a column of vectors of doubles. More... | |
int | setColumndata (unsigned n_column, const std::vector< short int > &data) |
The following methods allow to insert in the columns a group of values. More... | |
int | setColumndata (unsigned n_column, const std::vector< long int > &data) |
Insert a subset in a column of long ints. More... | |
int | setColumndata (unsigned n_column, const std::vector< int64 > &data) |
Insert a subset in a column of long long ints. More... | |
int | setColumndata (unsigned n_column, const std::vector< float > &data) |
Insert a subset in a column of floats. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::string > &data) |
Insert a subset in a column of strings. More... | |
int | setColumndata (unsigned n_column, const std::vector< double > &data) |
Insert a subset in a column of doubles. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< short int > > &data) |
Insert a subset in a column of vectors of bools. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< long int > > &data) |
Insert a subset in a column of vectors of long ints. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< int64 > > &data) |
Insert a subset in a column of vectors of long long ints. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< float > > &data) |
Insert a subset in a column of vectors of floats. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< std::string > > &data) |
Insert a subset in a column of vectors of strings. More... | |
int | setColumndata (unsigned n_column, const std::vector< std::vector< double > > &data) |
Insert a subset in a column of vectors of doubles. More... | |
void | resize (int num_rows) |
Reserves more rows on the table. More... | |
unsigned | getNumRows () const |
Returns the number of rows RESERVED in the table. More... | |
unsigned | getNumColumns () const |
Returns the number of columns in the table. More... | |
Private Member Functions | |
template<typename T , typename COLUMN > | |
int | __getNull (T &data, COLUMN *tmpColumn) const |
Templated method for handling the null values. More... | |
template<typename T , typename COLUMN > | |
int | __getCell (unsigned n_column, unsigned n_row, T &ndata, dataTypes type, COLUMN *tmpColumn) const |
Templated method that get's the data from a specified cell This is the method that does the real work. More... | |
template<typename T , typename COLUMN > | |
int | __setCell (unsigned n_column, unsigned n_row, const T &ndata, dataTypes type, COLUMN *tmpColumn) |
Templated method that set's the data in a specified cell This is the method that does the real work. More... | |
template<typename T , typename COLUMN > | |
int | __setColumnData (unsigned n_column, T &data, dataTypes type, COLUMN *tmpColumn) |
Templated method that set's portions of data in a specified column This method is deprecated and hence should not be used. More... | |
template<typename T > | |
int | __getCellByName (const std::string &colName, unsigned int n_row, T &data) const |
Templated method that get's column data using the column name This method get's the desired column number and calls getCell(...) More... | |
void | verifyInitialization () |
Verifies if all columns are initialized. More... | |
template<class TYPE > | |
std::string | ToString (const TYPE &t) const |
Auxiliary function to convert any value to string. More... | |
Private Attributes | |
bool | m_isInitialized |
std::vector< CondDBColumn * > | m_conddbtable |
unsigned | m_numRows |
Definition at line 20 of file GenericDbTable.h.
Enumerator | |
---|---|
CDB_NOT_INITIALIZED | |
CDB_RANGE_ERROR | |
CDB_TYPE_ERROR | |
CDB_SUCCESS | |
CDB_ALLOC_ERROR | |
CDB_STRTOARRAY_ERROR |
Definition at line 42 of file GenericDbTable.h.
Enumerator | |
---|---|
kNull | |
kBool | |
kInt | |
kFloat | |
kString | |
kDouble | |
kLongLong | |
kArrayBool | |
kArrayFloat | |
kArrayInt | |
kArrayString | |
kArrayDouble | |
kArrayLongLong |
Definition at line 25 of file GenericDbTable.h.
|
inline |
Default constructor.
n_columns | is the number of columns of the table |
n_rows | is the number of rows that must be reserved (OPTIONAL) |
Definition at line 55 of file GenericDbTable.h.
GenericDbTable::GenericDbTable | ( | unsigned | n_columns, |
int | n_rows = 0 |
||
) |
Default constructor.
n_columns | is the number of columns of the table |
n_rows | is the number of rows that must be reserved (OPTIONAL) |
Definition at line 28 of file GenericDbTable.cxx.
GenericDbTable::~GenericDbTable | ( | ) |
Object destructor.
Definition at line 53 of file GenericDbTable.cxx.
|
private |
Templated method that get's the data from a specified cell This is the method that does the real work.
Definition at line 1781 of file GenericDbTable.cxx.
|
private |
Templated method that get's column data using the column name This method get's the desired column number and calls getCell(...)
Definition at line 1870 of file GenericDbTable.cxx.
|
inlineprivate |
Templated method for handling the null values.
data | is the variable that will return the NULL value |
tmpColumn | is an auxiliary variable holding the pointer for the desired column |
Definition at line 595 of file GenericDbTable.h.
|
private |
Templated method that set's the data in a specified cell This is the method that does the real work.
Definition at line 1807 of file GenericDbTable.cxx.
|
private |
Templated method that set's portions of data in a specified column This method is deprecated and hence should not be used.
Definition at line 1844 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
double & | data | ||
) | const |
Definition at line 865 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
float & | data | ||
) | const |
Definition at line 861 of file GenericDbTable.cxx.
Definition at line 857 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
long int & | data | ||
) | const |
Definition at line 853 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
short int & | data | ||
) | const |
This method get's a value from a column of floats by its name instead the column number (.
colName | is the column name ( |
n_row | is the row number |
data | is the reference for a variable that will return the value |
Definition at line 848 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::string & | data | ||
) | const |
Definition at line 869 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< double > & | data | ||
) | const |
Definition at line 889 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< float > & | data | ||
) | const |
Definition at line 885 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< int64 > & | data | ||
) | const |
Definition at line 881 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< long int > & | data | ||
) | const |
Definition at line 877 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< short int > & | data | ||
) | const |
Definition at line 873 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | const std::string & | colName, |
unsigned int | n_row, | ||
std::vector< std::string > & | data | ||
) | const |
Definition at line 893 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
double & | ndata | ||
) | const |
This method gets a value from a cell in a column of doubles.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 802 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
float & | ndata | ||
) | const |
This method gets a value from a cell in a column of floats.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 719 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
int64 & | ndata | ||
) | const |
This method gets a value from a cell in a column of long long ints (bigint in MySQL)
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 712 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
long int & | ndata | ||
) | const |
This method gets a value from a cell in a column of long ints (int in MySQL)
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 700 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
short int & | ndata | ||
) | const |
This method gets a value from a cell in a column of long ints (int in MySQL)
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 706 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::string & | ndata | ||
) | const |
This method gets a value from a cell in a column of strings.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 725 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< double > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vector of doubles.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< float > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vectors of floats.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< int64 > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vectors of long long ints (bigint in MySQL - 8bytes)
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 820 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< long int > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vectors of long ints (int in MySQL - 4bytes)
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 808 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< short int > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vectors of bools.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 814 of file GenericDbTable.cxx.
int GenericDbTable::getCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
std::vector< std::string > & | ndata | ||
) | const |
This method gets a value from a cell in a column of vector of strings.
n_column | is the column number |
n_row | is the row number |
ndata | is the reference to the valriable where the value will be returned |
Definition at line 832 of file GenericDbTable.cxx.
int GenericDbTable::getNames | ( | std::vector< std::string > & | names | ) | const |
This method gets a vector containing the names of all columns in the table.
names | is the reference to the vector returned |
Definition at line 85 of file GenericDbTable.cxx.
int GenericDbTable::getNull | ( | unsigned | n_column, |
double & | null | ||
) | const |
Definition at line 286 of file GenericDbTable.cxx.
int GenericDbTable::getNull | ( | unsigned | n_column, |
float & | null | ||
) | const |
Get Null value for column.
Definition at line 237 of file GenericDbTable.cxx.
int GenericDbTable::getNull | ( | unsigned | n_column, |
int64 & | null | ||
) | const |
Definition at line 311 of file GenericDbTable.cxx.
int GenericDbTable::getNull | ( | unsigned | n_column, |
long int & | null | ||
) | const |
Definition at line 262 of file GenericDbTable.cxx.
int GenericDbTable::getNull | ( | unsigned | n_column, |
std::string & | null | ||
) | const |
Definition at line 137 of file GenericDbTable.cxx.
|
inline |
Returns the number of columns in the table.
The user must know if all rows reserved are already assigned with values
Definition at line 579 of file GenericDbTable.h.
|
inline |
Returns the number of rows RESERVED in the table.
The user must know if all rows reserved are already assigned with values
Definition at line 571 of file GenericDbTable.h.
int GenericDbTable::getRow | ( | unsigned | rowNumber, |
std::vector< std::string > & | values | ||
) | const |
This method returns a vector of strings with allelements in a row In case the cell has an array the first string has the number of elements (following strings) belonging to the array.
rowNumber | is the number of the row |
values | is the string that will be returned with the row elements |
Definition at line 1616 of file GenericDbTable.cxx.
int GenericDbTable::getRowID | ( | std::string & | pID | ) | const |
This method returns, for a given ID, the row number.
In case that this table does not have id's returns -1
pID | is the ID that must be searched |
Definition at line 111 of file GenericDbTable.cxx.
int GenericDbTable::getTypes | ( | std::vector< dataTypes > & | types | ) | const |
This method gets a vector containing the data types of all columns in the table.
types | is the reference to the vector returned |
Definition at line 98 of file GenericDbTable.cxx.
void GenericDbTable::Initialize | ( | unsigned | n_columns, |
int | n_rows = 0 |
||
) |
This method initializes a table created by the default constructor If the table had the number of columns already defined this does nothing.
n_columns | is the number of columns of this table |
n_rows | is the number of rows to allocate (OPTIONAL) |
Definition at line 61 of file GenericDbTable.cxx.
void GenericDbTable::resize | ( | int | num_rows | ) |
Reserves more rows on the table.
This method must be called at each time that one wants to insert new data on the table reserving only the number of rows that will be used!
num_rows | is the amount of rows that must be reserved in the table |
Definition at line 1606 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const double | ndata | ||
) |
This method changes a value from a cell in a column of doubles.
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 1026 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const float | ndata | ||
) |
This method changes a value from a cell in a column of floats.
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 921 of file GenericDbTable.cxx.
This method changes a value from a cell in a column of long long ints.
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 915 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const long int | ndata | ||
) |
This method changes a value from a cell in a column of long ints.
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 903 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const short int | ndata | ||
) |
set data methods
These methods allow to chage a value in a specified cell This method changes a value from a cell in a column of long ints
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 909 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::string & | ndata | ||
) |
This method changes a value from a cell in a column of strings.
n_column | is the column number |
n_row | is the row number |
ndata | is the new value to be assigned |
Definition at line 927 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< double > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of doubles.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< float > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of floats.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< int64 > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of long long ints.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
Definition at line 1044 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< long int > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of long ints.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
Definition at line 1038 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< short int > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of bools.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
Definition at line 1032 of file GenericDbTable.cxx.
int GenericDbTable::setCell | ( | unsigned | n_column, |
unsigned | n_row, | ||
const std::vector< std::string > & | ndata | ||
) |
This method changes a value from a cell in a column of vectors of strings.
n_column | is the column number |
n_row | is the row number |
ndata | is the new array to be assigned |
Definition at line 1064 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< double > & | data | ||
) |
Insert a subset in a column of doubles.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< float > & | data | ||
) |
Insert a subset in a column of floats.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Insert a subset in a column of long long ints.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1197 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< long int > & | data | ||
) |
Insert a subset in a column of long ints.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1191 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< short int > & | data | ||
) |
The following methods allow to insert in the columns a group of values.
The values are passed in a vector. In case that there are not enougth rows reserved to insert the values there will be only inserted data until all rows are filled and return the number of values from the vector passed. Insert a subset in a column of bools
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1203 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::string > & | data | ||
) |
Insert a subset in a column of strings.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1215 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< double > > & | data | ||
) |
Insert a subset in a column of vectors of doubles.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< float > > & | data | ||
) |
Insert a subset in a column of vectors of floats.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< int64 > > & | data | ||
) |
Insert a subset in a column of vectors of long long ints.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1433 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< long int > > & | data | ||
) |
Insert a subset in a column of vectors of long ints.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1427 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< short int > > & | data | ||
) |
Insert a subset in a column of vectors of bools.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1439 of file GenericDbTable.cxx.
int GenericDbTable::setColumndata | ( | unsigned | n_column, |
const std::vector< std::vector< std::string > > & | data | ||
) |
Insert a subset in a column of vectors of strings.
n_column | Refers to the column number |
data | refers to the values to be appended in the column |
Definition at line 1457 of file GenericDbTable.cxx.
int GenericDbTable::setName | ( | unsigned | n_column, |
const std::string & | name | ||
) |
This method defines the name for a specified column.
n_column | is the column number |
name | is a string with the name |
Definition at line 337 of file GenericDbTable.cxx.
int GenericDbTable::setNull | ( | unsigned | n_column, |
const double & | null | ||
) |
Definition at line 674 of file GenericDbTable.cxx.
int GenericDbTable::setNull | ( | unsigned | n_column, |
const float & | null | ||
) |
Definition at line 628 of file GenericDbTable.cxx.
int GenericDbTable::setNull | ( | unsigned | n_column, |
const long int & | null | ||
) |
Definition at line 605 of file GenericDbTable.cxx.
int GenericDbTable::setNull | ( | unsigned | n_column, |
const std::string & | null | ||
) |
Definition at line 530 of file GenericDbTable.cxx.
int GenericDbTable::setType | ( | unsigned | n_column, |
dataTypes | type | ||
) |
This method defines the data type for a specified column.
n_column | is the column number |
type | is a the type |
Definition at line 356 of file GenericDbTable.cxx.
|
private |
|
private |
Definition at line 734 of file GenericDbTable.h.
|
private |
Definition at line 733 of file GenericDbTable.h.
|
private |
Definition at line 735 of file GenericDbTable.h.