Description
DB¿¡ µé¾îÀÖ´Â schemaµéÀÇ Á¤º¸¸¦ ¾ò¾î¿Â´Ù. ÀÔ·Â ÆÄ¶ó¹ÌÅÍ´Â ¾ø´Ù. ÀÌ Á¤º¸¿¡´Â schemaÀÇ À̸§, tableµéÀÇ Á¤º¸, ±âº»¼½¼Ç(basic section), °¡»ó¼½¼Ç(virtual section), °áÇÕ¼½¼Ç(union section), ±âº»Å°(primary key), db¼³¸í(database description)µîÀÌ Æ÷ÇԵȴÙ.
service_TimeÀº ¸ðµç APIÀÇ ¸®ÅϰªÀ¸·Î¼ ¼ºñ½º¸¦ kristal ¼¹ö°¡ ó¸®ÇÑ ½Ã°£À» ¸»ÇÑ´Ù. ´ÜÀ§´Â mili-second ÀÌ´Ù.
InParameter
¾øÀ½
OutParameter
string userarea_text; // »ç¿ëÀÚ°¡ Database Schema¿¡ ¸í½ÃÇÑ ³»¿ë vector schemas.*; long Service_Time;
Example
// ÀÔ·Â ÆÄ¶ó¸ÞÅÍ Å¬·¡½º¿Í Ãâ·Â ÆÄ¶ó¸ÞÅÍ Å¬·¡½º¸¦ ¼±¾ð
Cparameter_t p_in, p_out;
// ÇöÀç DB ¼ºñ½º¿¡ Á¸ÀçÇÏ´Â ¸ðµç Å×À̺íÀÇ Á¤º¸(DB Information)¸¦
// °¡Á®¿Â´Ù. ¸®ÅϵǴ Á¤º¸´Â ½ºÅ°¸¶º°·Î ºÐ·ùµÈ´Ù.
ret_val = clientLib.Request(GET_DB_INFO, p_in, p_out);
cout << "User Area Text : [" << p_out.userarea_text << "]" << endl;
cout << "####################################################" << endl;
cout << " DB Information(The Total Number of Schemas: ";
cout << p_out.schemas.size() << ")" << endl;
cout << "####################################################" << endl;
for (int i = 0; i < p_out.schemas.size(); i++) {
// Å×À̺í¸í°ú Å×ÀÌºí ½Äº°ÀÚ Ãâ·Â
cout << "============================================" << endl;
cout << "Schema Name : " << p_out.schemas[i].schema_name << endl;
cout << "Volume Directory : " << p_out.schemas[i].volume_dir << endl;
cout << "Tables List : ";
for (int j = 0; j < p_out.schemas[i].tables.size(); j++) {
cout << p_out.schemas[i].tables[j].table_name;
cout << "(" << p_out.schemas[i].tables[j].table_id << "),";
}
cout << endl;
// ±âº» ¼½¼Ç Ãâ·Â
cout << "\t" << "< BASIC SECTION >" << endl;
for (int j = 0; j < p_out.schemas[i].basic_sections.size(); j++) {
cout << "\t\t-----------------------------------------" << endl;
cout << "\t\tSECTION NAME: ";
cout << p_out.schemas[i].basic_sections[j].section_name << endl;
cout << "\t\tDATA TYPE : ";
cout << p_out.schemas[i].basic_sections[j].data_type << endl;
cout << "\t\tINDEX TYPE : ";
cout << p_out.schemas[i].basic_sections[j].index_type << endl;
cout << "\t\tDEF. VALUE : "
cout << p_out.schemas[i].basic_sections[j].default_value << endl;
cout << "\t\tSTEMMING? : ";
cout << p_out.schemas[i].basic_sections[j].stemming << endl;
cout << "\t\tHANJA CONV? : ";
cout << p_out.schemas[i].basic_sections[j].hanja << endl;
cout << "\t\tSTOPWORD? : ";
cout << p_out.schemas[i].basic_sections[j].stopword << endl;
cout << "\t\t------------------------------------" << endl;
cout << endl << endl;
}
// °¡»ó ¼½¼Ç Ãâ·Â
cout << "\t" << "< VIRTUAL SECTION >" << endl;
for (int j = 0; j < p_out.schemas[i].virtual_sections.size(); j++) {
cout << "\t\t------------------------------------------------------------------" << endl;
cout << "\t\tSECTION NAME: " ;
cout << p_out.schemas[i].virtual_sections[j].virtual_section_name << endl;
cout << "\t\tORG. NAME : ";
cout << p_out.schemas[i].virtual_sections[j].original_section_name << endl;
cout << "\t\tINDEX TYPE : ";
cout << p_out.schemas[i].virtual_sections[j].index_type << endl;
cout << "\t\tSTEMMING? : ";
cout << p_out.schemas[i].virtual_sections[j].stemming << endl;
cout << "\t\tHANJA CONV? : ";
cout << p_out.schemas[i].virtual_sections[j].hanja << endl;
cout << "\t\tSTOPWORD? : ";
cout << p_out.schemas[i].virtual_sections[j].stopword << endl;
cout << "\t\t--------------------------------------------------------------" << endl;
cout << endl << endl;
}
// ÅëÇÕ ¼½¼Ç Ãâ·Â
for (int j = 0; j < p_out.schemas[i].union_sections.size(); j++) {
cout << "\t\t---------------------------------------------------------------" << endl;
cout << "\t\tSECTION NAME: ";
cout << p_out.schemas[i].union_sections[j].union_section_name << endl;
cout << "\t\tSECTION LIST: ";
int secsize = p_out.schemas[i].union_sections[j].section_namelist.size();
for (int k = 0; k < secsize; k++) {
cout << p_out.schemas[i].union_sections[j].section_namelist[k] << ", ";
}
cout << endl;
cout << "\t\t------------------------------------------------------------------" << endl;
cout << endl << endl;
}
// ±âº» Ű ¼½¼Ç Ãâ·Â
for (int j = 0; j < p_out.schemas[i].primary_sections.size(); j++) {
cout << "\t\t---------------------------------------------------------------" << endl;
cout << "\t\tSECTION NAME: ";
cout << p_out.schemas[i].primary_sections[j].primary_section_name
cout<< endl;
cout << "\t\t---------------------------------------------------------------" << endl;
cout << endl << endl;
}
cout << "===========================================" << endl;
}