Inheritance diagram for SqlStdout:
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 |
SqlStdout::SqlStdout | ( | ) |
Definition at line 256 of file history_odbc.cxx.
00257 { 00258 fp = NULL; 00259 fIsConnected = false; 00260 }
SqlStdout::~SqlStdout | ( | ) |
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] |
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] |
const char* SqlStdout::GetColumn | ( | int | icol | ) | [virtual] |
int SqlStdout::GetNumColumns | ( | ) | [virtual] |
int SqlStdout::GetNumRows | ( | ) | [virtual] |
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] |
std::vector<std::string> SqlStdout::ListTables | ( | ) | [virtual] |
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().