common_database_support Class Reference

#include <common.h>

List of all members.

Static Public Member Functions

static int syb_msg_handler (DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
 message handler that we hook into the db mechanism for feedback.
static int syb_err_handler (DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
static void nerf_special_characters (istring &to_nerf, char escape_char)
 fixes "to_nerf"; any special characters are escaped using "escape_char".

Static Public Attributes

static bool _error_was_seen
 records when an error was seen in the message or error handlers.


Detailed Description

Definition at line 79 of file common.h.


Member Function Documentation

int common_database_support::syb_msg_handler ( DBPROCESS *  dbproc,
DBINT  msgno,
int  msgstate,
int  severity,
char *  msgtext,
char *  srvname,
char *  procname,
int  line 
) [static]

message handler that we hook into the db mechanism for feedback.

Definition at line 40 of file common.cpp.

References _error_was_seen, log_base::log(), log(), NULL, and program_wide_logger().

Referenced by query_handler::login_to_database().

int common_database_support::syb_err_handler ( DBPROCESS *  dbproc,
int  severity,
int  dberr,
int  oserr,
char *  dberrstr,
char *  oserrstr 
) [static]

Definition at line 117 of file common.cpp.

References _error_was_seen, log_base::log(), NULL, and program_wide_logger().

Referenced by query_handler::login_to_database().

void common_database_support::nerf_special_characters ( istring to_nerf,
char  escape_char 
) [static]

fixes "to_nerf"; any special characters are escaped using "escape_char".

note that this should not be used on strings that have single quotes around the outside; this function assumes that any single quotes need to be escaped. add the outer single quotes after nerfing the string.

Definition at line 166 of file common.cpp.

References istring::insert(), and istring::length().

Referenced by main(), and grid_processor::process_grid_files().


Member Data Documentation

bool common_database_support::_error_was_seen [static]

records when an error was seen in the message or error handlers.

this should be reset by an external entity once the error has been recognized and possibly handled.

Definition at line 83 of file common.h.

Referenced by query_handler::prepare_for_query(), query_handler::query_handler(), syb_err_handler(), and syb_msg_handler().


The documentation for this class was generated from the following files:
Generated on Sat Aug 30 04:33:12 2008 for HOOPLE Libraries by  doxygen 1.5.1