SqlStdout Class Reference

Inheritance diagram for SqlStdout:

SqlBase

Detailed Description

Definition at line 220 of file history_odbc.cxx.

Public Member Functions

int Connect (const char *filename=NULL)
int Exec (const char *sql)
int Disconnect ()
bool IsConnected ()
 SqlStdout ()
 ~SqlStdout ()
int GetNumRows ()
int GetNumColumns ()
int Fetch ()
int Done ()
std::vector< std::string > ListTables ()
std::vector< std::string > ListColumns (const char *table)
const char * GetColumn (int icol)

Data Fields

FILE * fp
bool fIsConnected


Constructor & Destructor Documentation

SqlStdout::SqlStdout (  ) 

Definition at line 256 of file history_odbc.cxx.

00257   {
00258     fp = NULL;
00259     fIsConnected = false;
00260   }

SqlStdout::~SqlStdout (  ) 

Definition at line 262 of file history_odbc.cxx.

00263   {
00264     if (fp)
00265       fclose(fp);
00266     fp = NULL;
00267   }


Member Function Documentation

int SqlStdout::Connect ( const char *  filename = NULL  )  [virtual]

Implements SqlBase.

Definition at line 227 of file history_odbc.cxx.

00228   {
00229     if (!filename)
00230       filename = "/dev/fd/1";
00231     fp = fopen(filename, "w");
00232     assert(fp);
00233     sql_type = sql_type_mysql;
00234     fIsConnected = true;
00235     return 0;
00236   }

int SqlStdout::Disconnect (  )  [virtual]

Implements SqlBase.

Definition at line 244 of file history_odbc.cxx.

00245   {
00246     // do nothing
00247     fIsConnected = false;
00248     return 0;
00249   }

int SqlStdout::Done (  )  [virtual]

Implements SqlBase.

Definition at line 272 of file history_odbc.cxx.

00272 { return 0; }

int SqlStdout::Exec ( const char *  sql  )  [virtual]

Implements SqlBase.

Definition at line 238 of file history_odbc.cxx.

00239   {
00240     fprintf(fp, "%s\n", sql);
00241     return 0;
00242   }

int SqlStdout::Fetch (  )  [virtual]

Implements SqlBase.

Definition at line 271 of file history_odbc.cxx.

00271 { return 0; }

const char* SqlStdout::GetColumn ( int  icol  )  [virtual]

Implements SqlBase.

Definition at line 275 of file history_odbc.cxx.

00275 { return NULL; };

int SqlStdout::GetNumColumns (  )  [virtual]

Implements SqlBase.

Definition at line 270 of file history_odbc.cxx.

00270 { return 0; }

int SqlStdout::GetNumRows (  )  [virtual]

Implements SqlBase.

Definition at line 269 of file history_odbc.cxx.

00269 { return 0; }

bool SqlStdout::IsConnected (  )  [virtual]

Implements SqlBase.

Definition at line 251 of file history_odbc.cxx.

00252   {
00253     return fIsConnected;
00254   }

std::vector<std::string> SqlStdout::ListColumns ( const char *  table  )  [virtual]

Implements SqlBase.

Definition at line 274 of file history_odbc.cxx.

00274 { std::vector<std::string> list; return list; };

std::vector<std::string> SqlStdout::ListTables (  )  [virtual]

Implements SqlBase.

Definition at line 273 of file history_odbc.cxx.

00273 { std::vector<std::string> list; return list; };


Field Documentation

bool SqlStdout::fIsConnected

Definition at line 224 of file history_odbc.cxx.

Referenced by Connect(), Disconnect(), IsConnected(), and SqlStdout().

FILE* SqlStdout::fp

Definition at line 223 of file history_odbc.cxx.

Referenced by Connect(), Exec(), SqlStdout(), and ~SqlStdout().


Midas DOC Version 3.0.0 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk