GOFIGURE2
0.9.0
|
Go to the source code of this file.
Functions | |
std::string | AddDistinctToWhat (const std::string &iWhat) |
DISTINCT iWhat. More... | |
std::string | AddOrderBy (const std::string &iAttribute, std::string iAscDesc) |
ORDER BY iAttributes iAscDesc. More... | |
std::string | GetConditions (const std::vector< FieldWithValue > &iConditions, std::string iConditionConnector) |
std::string | GetConditions (const std::string &iField, const std::string &iValue, std::string iConnector) |
std::string | GetGroupBy (const std::string &iColumn, unsigned int iNumberDoublons) |
std::string | GetLeftJoinThreeTables (const std::string &iTable, const std::string &iTableTwo, const std::string &iTableThree, const FieldWithValue &iOnConditionOne, const FieldWithValue &iOnConditionTwo) |
(iTable LEFT JOIN iTableTwo ON iTable.iOnCondition/Field = iTableTwo.iOnCondition/Value) LEFT JOIN iTableThree ON iTable.iOnCondition/Field = iTableThree.iOnCondition/Value) More... | |
std::string | GetLeftJoinTwoTables (const std::string &iTableOne, const std::string &iTableTwo, const FieldWithValue &iOnCondition, bool NonNULLRows) |
iTableOne LEFT JOIN iTableTwo ON iTableOne.iOnCondition/Field = iTableTwo.iOnCondition/Value More... | |
std::string | GetSelectedAttributes (const std::vector< std::string > &iListAttributes) |
iListAttributes[i], iListAttributes[i+1]... More... | |
std::vector< std::string > | ListUnsgIntToVectorString (const std::list< unsigned int > &iList) |
std::string | SelectForTracesInfo (const std::vector< std::string > &iSelectedAttributes, const std::string &iTableOne, const std::string &iTableTwo, const std::string &iTableThree, const FieldWithValue &iJoinConditionOne, const FieldWithValue &iJoinConditionTwo, const std::string &iFieldOne, unsigned int iValueFieldOne, const std::string &iIDFieldName, const std::list< unsigned int > &iListIDs) |
SELECT iSelectedAttributes[0], iSelectedAttributes[1]...FROM (iTableOne left join iTableTwo on iJoinConditionOne) left join tableThree on iJoinConditionTwo where (iFieldOne = iValueFieldOne) AND (IDFieldName = iListIDs[0] OR IDFieldName = iListIDs[1] OR....);. More... | |
std::string | SelectGeneralQuery (const std::string &iWhat, const std::string &iWhere, std::string iOrderByQuery) |
SELECT iWhat FROM iWhere iOrderByQuery. More... | |
std::string | SelectGeneralQueryConditions (const std::string &iWhat, const std::string &iWhere, const std::string &iConditions) |
SELECT iWhat FROM iWhere WHERE iConditions. More... | |
std::string | SelectQueryStream (const std::string &iTable, const std::string &iColumn, std::string iOrderByColumnName, std::string iAscDesc) |
SELECT iColumn FROM iTable ORDER BY iOrderByColumnName iAscDesc;. More... | |
std::string | SelectQueryStream (const std::string &iTable, const std::vector< std::string > &iListAttributes, std::string iOrderByColumnName, std::string iAscDesc) |
SELECT iColumn[i],iColumn[i=1]... FROM iTable ORDER BY iOrderByColumnName iAscDesc;. More... | |
std::string | SelectQueryStreamCondition (const std::string &iTable, const std::string &iColumn, const std::string &iConditions, bool Distinct, std::string iOrderByColumnName, std::string iAscDesc) |
SELECT (Distinct) iColumn FROM iTable WHERE iConditions (ORDER BY irderByColumnName iAscDesc);. More... | |
std::string | SelectQueryStreamCondition (const std::string &iTable, const std::string &iColumn, const std::string &iField, const std::string &iValue, std::string iOrderByColumnName, std::string iAscDesc, bool Distinct) |
std::string | SelectQueryStreamCondition (const std::string &iTable, const std::vector< std::string > &iListAttributes, const std::string &iField, const std::string &iValue, std::string iOrderByColumnName, std::string iAscDesc) |
std::string | SelectQueryStreamListConditions (const std::string &iTable, const std::string &iColumn, const std::string &iField, const std::vector< std::string > &iListValues, bool Distinct, std::string iConditionConnector) |
SELECT (Distinct) iColumn FROM iTable WHERE iField = iValue Or/And... More... | |
std::string | SelectQueryStreamListConditions (const std::string &iTable, const std::vector< std::string > &iListAttributes, const std::string &iField, const std::vector< std::string > &iListValues, std::string iConditionConnector, bool Distinct) |
std::string | SelectQueryStreamListConditions (const std::string &iTable, const std::string &iColumn, const std::vector< FieldWithValue > &iConditions, std::string iConditionConnector, bool Distinct) |
std::string | SelectQueryStreamListConditions (const std::string &iTable, const std::vector< std::string > &iListAttributes, const std::vector< FieldWithValue > &iConditions, std::string iConditionConnector, bool Distinct, std::string iOrderByColumnName) |
std::list< unsigned int > | VectorStringToUnsgInt (const std::vector< std::string > &iVector) |
std::vector< std::string > | VectorUnsgIntToVectorString (const std::vector< unsigned int > &iVector) |
std::string AddDistinctToWhat | ( | const std::string & | iWhat | ) |
DISTINCT iWhat.
[in] | iWhat | attributes |
Definition at line 248 of file QueryBuilderHelper.cxx.
std::string AddOrderBy | ( | const std::string & | iAttribute, |
std::string | iAscDesc = "ASC" |
||
) |
ORDER BY iAttributes iAscDesc.
[in] | iAttribute | attribute to be sorted |
[in] | iAscDesc | ascendent or descendent sorting |
Definition at line 259 of file QueryBuilderHelper.cxx.
std::string GetConditions | ( | const std::vector< FieldWithValue > & | iConditions, |
std::string | iConditionConnector | ||
) |
Definition at line 273 of file QueryBuilderHelper.cxx.
std::string GetConditions | ( | const std::string & | iField, |
const std::string & | iValue, | ||
std::string | iConnector | ||
) |
Definition at line 304 of file QueryBuilderHelper.cxx.
std::string GetGroupBy | ( | const std::string & | iColumn, |
unsigned int | iNumberDoublons | ||
) |
Definition at line 437 of file QueryBuilderHelper.cxx.
std::string GetLeftJoinThreeTables | ( | const std::string & | iTable, |
const std::string & | iTableTwo, | ||
const std::string & | iTableThree, | ||
const FieldWithValue & | iOnConditionOne, | ||
const FieldWithValue & | iOnConditionTwo | ||
) |
(iTable LEFT JOIN iTableTwo ON iTable.iOnCondition/Field = iTableTwo.iOnCondition/Value) LEFT JOIN iTableThree ON iTable.iOnCondition/Field = iTableThree.iOnCondition/Value)
[in] | iTable | table to be joined |
[in] | iTableTwo | table to be joined to the 1rst one |
[in] | iTableThree | table to be joined ot the 1rst one |
[in] | iOnConditionOne | join on which condition between table and tableTwo |
[in] | iOnConditionTwo | join on which condition between table and tableThree |
Definition at line 417 of file QueryBuilderHelper.cxx.
std::string GetLeftJoinTwoTables | ( | const std::string & | iTableOne, |
const std::string & | iTableTwo, | ||
const FieldWithValue & | iOnCondition, | ||
bool | NonNULLRows = false |
||
) |
iTableOne LEFT JOIN iTableTwo ON iTableOne.iOnCondition/Field = iTableTwo.iOnCondition/Value
[in] | iTableOne | table to be joined |
[in] | iTableTwo | table to be joined to |
[in] | iOnCondition | join on which condition |
[in] | NonNULLRows | if the connection is not found for 2 tables, there won't be a result |
Definition at line 384 of file QueryBuilderHelper.cxx.
std::string GetSelectedAttributes | ( | const std::vector< std::string > & | iListAttributes | ) |
iListAttributes[i], iListAttributes[i+1]...
[in] | iListAttributes | list of the attributes to be selected |
Definition at line 318 of file QueryBuilderHelper.cxx.
std::vector< std::string > ListUnsgIntToVectorString | ( | const std::list< unsigned int > & | iList | ) |
Definition at line 335 of file QueryBuilderHelper.cxx.
std::string SelectForTracesInfo | ( | const std::vector< std::string > & | iSelectedAttributes, |
const std::string & | iTableOne, | ||
const std::string & | iTableTwo, | ||
const std::string & | iTableThree, | ||
const FieldWithValue & | iJoinConditionOne, | ||
const FieldWithValue & | iJoinConditionTwo, | ||
const std::string & | iFieldOne, | ||
unsigned int | iValueFieldOne, | ||
const std::string & | iIDFieldName, | ||
const std::list< unsigned int > & | iListIDs | ||
) |
SELECT iSelectedAttributes[0], iSelectedAttributes[1]...FROM (iTableOne left join iTableTwo on iJoinConditionOne) left join tableThree on iJoinConditionTwo where (iFieldOne = iValueFieldOne) AND (IDFieldName = iListIDs[0] OR IDFieldName = iListIDs[1] OR....);.
[in] | iSelectedAttributes | vector of all the attributes to be fetched from the db |
[in] | iTableOne | main table involved (usually the table for the trace) |
[in] | iTableTwo | table attached to the main table |
[in] | iTableThree | table attached to the main table |
[in] | iJoinConditionOne | describes how the tabletwo is attached to the main table |
[in] | iJoinConditionTwo | describes how the tablethree is attached to the main table |
[in] | iFieldOne | first condition |
[in] | iValueFieldOne | value for the first condition |
[in] | iIDFieldName | field for the IDName where there is a condition |
[in] | iListIDs | values for the iIDFieldname |
Definition at line 456 of file QueryBuilderHelper.cxx.
std::string SelectGeneralQuery | ( | const std::string & | iWhat, |
const std::string & | iWhere, | ||
std::string | iOrderByQuery = "" |
||
) |
SELECT iWhat FROM iWhere iOrderByQuery.
[in] | iWhat | list of attributes separated by commas |
[in] | iWhere | list of tables, included joined tables |
[in] | iOrderByQuery | part of the query to order by |
Definition at line 58 of file QueryBuilderHelper.cxx.
std::string SelectGeneralQueryConditions | ( | const std::string & | iWhat, |
const std::string & | iWhere, | ||
const std::string & | iConditions | ||
) |
SELECT iWhat FROM iWhere WHERE iConditions.
[in] | iWhat | list of attributes separated by commas |
[in] | iWhere | list of tables, included joined tables |
[in] | iConditions | list of conditions |
Definition at line 39 of file QueryBuilderHelper.cxx.
std::string SelectQueryStream | ( | const std::string & | iTable, |
const std::string & | iColumn, | ||
std::string | iOrderByColumnName = "" , |
||
std::string | iAscDesc = "ASC" |
||
) |
SELECT iColumn FROM iTable ORDER BY iOrderByColumnName iAscDesc;.
[in] | iTable | name of the database table |
[in] | iColumn | name of the attribute to select |
[in] | iOrderByColumnName | name of the column by which the results will be sorted, if empty, no sorting |
[in] | iAscDesc | order to sort the results, ascendent by default |
Definition at line 79 of file QueryBuilderHelper.cxx.
std::string SelectQueryStream | ( | const std::string & | iTable, |
const std::vector< std::string > & | iListAttributes, | ||
std::string | iOrderByColumnName = "" , |
||
std::string | iAscDesc = "ASC" |
||
) |
SELECT iColumn[i],iColumn[i=1]... FROM iTable ORDER BY iOrderByColumnName iAscDesc;.
[in] | iTable | name of the database table |
[in] | iListAttributes | name of the attributes to select |
[in] | iOrderByColumnName | name of the column by which the results will be sorted, if empty, no sorting |
[in] | iAscDesc | order to sort the results, ascendent by default |
Definition at line 97 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamCondition | ( | const std::string & | iTable, |
const std::string & | iColumn, | ||
const std::string & | iConditions, | ||
bool | Distinct = false , |
||
std::string | iOrderByColumnName = "" , |
||
std::string | iAscDesc = "ASC" |
||
) |
SELECT (Distinct) iColumn FROM iTable WHERE iConditions (ORDER BY irderByColumnName iAscDesc);.
[in] | iTable | name of the database table |
[in] | iColumn | name of the attribute to select |
[in] | iOrderByColumnName | name of the column by which the results will be sorted, if empty, no sorting |
[in] | iAscDesc | order to sort the results, ascendent by default |
[in] | iConditions | name of the columns separated by comma that are part of the 'where' |
[in] | Distinct | true if no doublon allowed |
Definition at line 111 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamCondition | ( | const std::string & | iTable, |
const std::string & | iColumn, | ||
const std::string & | iField, | ||
const std::string & | iValue, | ||
std::string | iOrderByColumnName = "" , |
||
std::string | iAscDesc = "ASC" , |
||
bool | Distinct = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 136 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamCondition | ( | const std::string & | iTable, |
const std::vector< std::string > & | iListAttributes, | ||
const std::string & | iField, | ||
const std::string & | iValue, | ||
std::string | iOrderByColumnName = "" , |
||
std::string | iAscDesc = "ASC" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 157 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamListConditions | ( | const std::string & | iTable, |
const std::string & | iColumn, | ||
const std::string & | iField, | ||
const std::vector< std::string > & | iListValues, | ||
bool | Distinct = false , |
||
std::string | iConditionConnector = "OR" |
||
) |
SELECT (Distinct) iColumn FROM iTable WHERE iField = iValue Or/And...
[in] | iTable | name of the database table |
[in] | iColumn | name of the attribute to select |
[in] | iField | name of the condition |
[in] | iListValues | values of the condition |
[in] | Distinct | if set to true no doublon allowed |
[in] | iConditionConnector | or/and |
Definition at line 173 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamListConditions | ( | const std::string & | iTable, |
const std::vector< std::string > & | iListAttributes, | ||
const std::string & | iField, | ||
const std::vector< std::string > & | iListValues, | ||
std::string | iConditionConnector, | ||
bool | Distinct | ||
) |
Definition at line 189 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamListConditions | ( | const std::string & | iTable, |
const std::string & | iColumn, | ||
const std::vector< FieldWithValue > & | iConditions, | ||
std::string | iConditionConnector = "OR" , |
||
bool | Distinct = false |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 206 of file QueryBuilderHelper.cxx.
std::string SelectQueryStreamListConditions | ( | const std::string & | iTable, |
const std::vector< std::string > & | iListAttributes, | ||
const std::vector< FieldWithValue > & | iConditions, | ||
std::string | iConditionConnector = "OR" , |
||
bool | Distinct = false , |
||
std::string | iOrderByColumnName = "" |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 226 of file QueryBuilderHelper.cxx.
std::list< unsigned int > VectorStringToUnsgInt | ( | const std::vector< std::string > & | iVector | ) |
Definition at line 352 of file QueryBuilderHelper.cxx.
std::vector< std::string > VectorUnsgIntToVectorString | ( | const std::vector< unsigned int > & | iVector | ) |
Definition at line 368 of file QueryBuilderHelper.cxx.