Inheritance diagram for SqlDebug:
Definition at line 207 of file history_sql.cxx.
Public Member Functions | |
SqlDebug () | |
~SqlDebug () | |
int | SetDebug (int debug) |
int | Connect (const char *filename=NULL) |
int | Exec (const char *sql) |
int | Disconnect () |
bool | IsConnected () |
int | GetNumRows () |
int | GetNumColumns () |
int | Fetch () |
int | Done () |
int | ListTables (std::vector< std::string > *plist) |
int | ListColumns (const char *table, std::vector< std::string > *plist) |
const char * | GetColumn (int icol) |
Data Fields | |
FILE * | fp |
bool | fIsConnected |
int | fDebug |
SqlDebug::SqlDebug | ( | ) |
Definition at line 216 of file history_sql.cxx.
00217 { 00218 fp = NULL; 00219 fIsConnected = false; 00220 }
SqlDebug::~SqlDebug | ( | ) |
int SqlDebug::Connect | ( | const char * | filename = NULL |
) | [virtual] |
Implements SqlBase.
Definition at line 236 of file history_sql.cxx.
00237 { 00238 if (!filename) 00239 filename = "/dev/fd/1"; 00240 fp = fopen(filename, "w"); 00241 assert(fp); 00242 sql_type = sql_type_mysql; 00243 fIsConnected = true; 00244 return DB_SUCCESS; 00245 }
int SqlDebug::Disconnect | ( | ) | [virtual] |
Implements SqlBase.
Definition at line 253 of file history_sql.cxx.
00254 { 00255 // do nothing 00256 fIsConnected = false; 00257 return DB_SUCCESS; 00258 }
int SqlDebug::Done | ( | ) | [virtual] |
int SqlDebug::Exec | ( | const char * | sql | ) | [virtual] |
Implements SqlBase.
Definition at line 247 of file history_sql.cxx.
00248 { 00249 fprintf(fp, "%s\n", sql); 00250 return DB_SUCCESS; 00251 }
int SqlDebug::Fetch | ( | ) | [virtual] |
Implements SqlBase.
Definition at line 267 of file history_sql.cxx.
00267 { return DB_NO_MORE_SUBKEYS; }
const char* SqlDebug::GetColumn | ( | int | icol | ) | [virtual] |
int SqlDebug::GetNumColumns | ( | ) | [virtual] |
int SqlDebug::GetNumRows | ( | ) | [virtual] |
bool SqlDebug::IsConnected | ( | ) | [virtual] |
Implements SqlBase.
Definition at line 260 of file history_sql.cxx.
00261 { 00262 return fIsConnected; 00263 }
int SqlDebug::ListColumns | ( | const char * | table, | |
std::vector< std::string > * | plist | |||
) | [virtual] |
int SqlDebug::ListTables | ( | std::vector< std::string > * | plist | ) | [virtual] |
int SqlDebug::SetDebug | ( | int | debug | ) | [virtual] |
int SqlDebug::fDebug |
Definition at line 211 of file history_sql.cxx.
Referenced by Connect(), Disconnect(), IsConnected(), and SqlDebug().
FILE* SqlDebug::fp |
Definition at line 210 of file history_sql.cxx.
Referenced by Connect(), Exec(), SqlDebug(), and ~SqlDebug().