13 printCatalog(pkDetails, fkDetails, ukDetails, idxDetails, ccDetails);
20 std::ostringstream output;
24 output <<
"DataSets:" << std::endl;
26 for(
unsigned int i = 0; i < names.size(); i++)
27 output <<
" " << *names[i] << std::endl;
31 std::cout << output.str() << std::endl;
37 std::ostringstream output;
41 output <<
"DataSource:" << std::endl << std::endl;
45 output <<
" " << dsh.
name << std::endl;
48 output <<
" " << dsh.
type << std::endl;
50 std::cout << output.str() << std::endl;
58 if(!vecDataSetName.empty())
61 std::cout <<
"Catalog:" << std::endl;
62 std::cout <<
"--------" << std::endl << std::endl;
64 for(
unsigned int i = 0; i < vecDataSetName.size(); i++)
66 printDataSetInfo(*vecDataSetName[i], pkDetails, fkDetails, ukDetails, idxDetails, ccDetails);
74 std::ostringstream output;
80 output <<
"Capabilities:" << std::endl << std::endl;
82 std::map<std::string, std::string>::iterator it = mapCap.begin();
84 while(it != mapCap.end())
86 output <<
" " << it->first <<
" = " << it->second << std::endl;
91 std::cout << output.str() << std::endl;
97 std::ostringstream output;
99 output <<
" " << pk.
name << std::endl;
101 for(
unsigned int i = 0; i < pk.
porperties.size(); i++)
103 output <<
" " << pk.
porperties[i] << std::endl;
106 std::cout << output.str();
112 std::ostringstream output;
114 output <<
" " << fk.
name << std::endl;
116 for(
unsigned int i = 0; i < fk.
porperties.size(); i++)
118 output <<
" " << fk.
porperties[i] << std::endl;
121 std::cout << output.str();
126 std::ostringstream output;
128 output <<
" " << uk.
name << std::endl;
130 for(
unsigned int i = 0; i < uk.
porperties.size(); i++)
132 output <<
" " << uk.
porperties[i] << std::endl;
135 std::cout << output.str();
140 std::ostringstream output;
142 output <<
" " << idx.
name <<
" | " << idx.
type << std::endl;
144 for(
unsigned int i = 0; i < idx.
porperties.size(); i++)
146 output <<
" " << idx.
porperties[i] << std::endl;
149 std::cout << output.str();
154 std::ostringstream output;
156 output <<
" " << cc.
name << std::endl;
159 std::cout << output.str();
164 std::ostringstream params;
168 std::map<std::string, std::vector<std::string>>::iterator it = mapParams.begin();
170 params <<
"Data Source Parameters" << std::endl;
171 params <<
"----------------------" << std::endl << std::endl;
173 while(it != mapParams.end())
175 params << it->first << std::endl;
177 for(
unsigned int i = 0; i < it->second.size(); i++)
179 params <<
" " << it->second[i] << std::endl;
187 std::cout << std::endl << params.str() << std::endl;
192 for(
unsigned int i = 0; i < dataSetNameList.size(); i++)
194 printDataSetInfo(dataSetNameList[i], pkDetails, fkDetails, ukDetails, idxDetails, ccDetails);
202 std::cout << ds.
name << std::endl;
204 std::cout <<
" Has Primary Key: " << (ds.
hasPk ?
"true" :
"false") << std::endl;
205 if(pkDetails && ds.
hasPk)
210 std::cout <<
" Number of Foreign Keys: " << ds.
vecFkInfo.size() << std::endl;
213 for(
unsigned int j = 0; j < ds.
vecFkInfo.size(); j++)
219 std::cout <<
" Number of Unique Keys: " << ds.
vecUkInfo.size() << std::endl;
222 for(
unsigned int j = 0; j < ds.
vecUkInfo.size(); j++)
228 std::cout <<
" Number of Indexes: " << ds.
vecIdxInfo.size() << std::endl;
231 for(
unsigned int j = 0; j < ds.
vecIdxInfo.size(); j++)
237 std::cout <<
" Number of Check Constraints: " << ds.
vecCcInfo.size() << std::endl;
240 for(
unsigned int j = 0; j < ds.
vecCcInfo.size(); j++)
246 std::cout << std::endl;
void printUKDetails(struct UKInfo uk)
Print Unique Key Details.
Struct that stores information about a index using the most common data types.
bool init(std::string dstype, std::string connstr)
Init the application.
std::vector< std::string > porperties
Foreign Key Properties in a string vector.
std::vector< UKInfo > vecUkInfo
Unique Key struct vector.
std::vector< std::string > porperties
Unique Key Properties in a string vector.
bool init(std::string dstype, std::string connstr)
Init.
DataSetStruct getDataSetInfo(std::string dataSetName)
Get specific Data Set information.
void printCapabilities()
Print Data Source Capabilities.
std::vector< std::string > porperties
Primary Key Properties in a string vector.
Struct that stores information about a check constraint using the most common data types...
std::vector< std::string > porperties
Index Properties in a string vector.
std::vector< IdxInfo > vecIdxInfo
Index struct vector.
void printHeader()
Print Data Source Header.
void printFKDetails(struct FKInfo fk)
Print Foreign Key Details.
std::string type
Index Type.
void printCCDetails(struct CCInfo cc)
Print Check Constraint Details.
std::string name
Index Name.
Struct that stores information about a primary key using the most common data types.
std::string name
Primary Key Name.
void printCatalog(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print Data Source Catalog.
void printIdxDetails(struct IdxInfo idx)
Index Details.
void printDataSetInfo(std::vector< std::string > dataSetNameList, bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print Data Set Informations.
DataSourceHeader getDataSourceHeader()
Get the Data Source Header.
std::string expression
Check Constraint Expression.
std::map< std::string, std::string > getCapabilities()
Get the Data Source Capabilities.
std::vector< CCInfo > vecCcInfo
Check Constraint struct vector.
Struct that stores information about a data set using the most common data types. ...
std::string name
Check Constraint Name.
void printPKDetails(struct PKInfo pk)
Print Primary Key Details.
void printDataSetNameList()
Print Data Set Name List.
Struct that stores information about a unique key using the most common data types.
void printAllInfo(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print All Data Source Informations.
std::map< std::string, std::vector< std::string > > getDataSourceParameters(std::string dataSourceType)
Get Data Source Types connection parameters.
std::string name
Foreign Key Name.
Informations printing manager.
DSInfo m_dsi
DSInfo object.
std::vector< std::string * > getDataSetNameList()
Get all Data Sets names.
std::vector< FKInfo > vecFkInfo
Foreign Key struct vector.
Struct that stores information about a foreign key using the most common data types.
bool hasPk
If has Primary key.
void printDataSourceParameters(std::string dsType)
Print Data Source Parameters.
std::string name
Unique Key Name.
std::string name
Data Set Name.
PKInfo pkInfo
Primary Key struct.