Changeset 4577 for trunk/MagicSoft/Mars/msql
- Timestamp:
- 08/11/04 12:01:44 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/msql
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msql/MSQLServer.cc
r4514 r4577 221 221 } 222 222 223 void MSQLServer::PrintLine(const TArrayI &max) const/*FOLD00*/223 void MSQLServer::PrintLine(const TArrayI &max) /*FOLD00*/ 224 224 { 225 225 cout << "+" << setfill('-'); … … 229 229 } 230 230 231 void MSQLServer::PrintTable(TSQLResult *res) const/*FOLD00*/232 { 233 Int_t n = res ->GetFieldCount();231 void MSQLServer::PrintTable(TSQLResult &res) /*FOLD00*/ 232 { 233 Int_t n = res.GetFieldCount(); 234 234 235 235 TArrayI max(n); 236 236 237 237 for (int i=0; i<n; i++) 238 max[i] = strlen(res ->GetFieldName(i));238 max[i] = strlen(res.GetFieldName(i)); 239 239 240 240 TSQLRow *row; 241 241 242 242 TList rows; 243 while ((row=res ->Next()))243 while ((row=res.Next())) 244 244 { 245 245 for (int i=0; i<n; i++) … … 254 254 cout << "|" << setfill(' '); 255 255 for (int i=0; i<n; i++) 256 cout << setw(max[i]+1) << res ->GetFieldName(i) << " |";256 cout << setw(max[i]+1) << res.GetFieldName(i) << " |"; 257 257 cout << endl; 258 258 … … 305 305 if (res) 306 306 { 307 PrintTable( res);307 PrintTable(*res); 308 308 delete res; 309 309 } -
trunk/MagicSoft/Mars/msql/MSQLServer.h
r4514 r4577 28 28 Bool_t PrintError(const char *txt, const char *q) const; 29 29 30 void PrintLine(const TArrayI &max) const;31 void PrintTable(TSQLResult *res) const;32 30 TString GetFields() const; 33 31 … … 84 82 ~MSQLServer(); 85 83 84 static void PrintLine(const TArrayI &max); 85 static void PrintTable(TSQLResult &res); 86 86 87 const char *GetName() const; 87 88
Note:
See TracChangeset
for help on using the changeset viewer.