|
|
| version 1.159, 2002/08/13 13:08:46 | version 1.160, 2002/08/15 10:38:18 |
|---|---|
| Line 616 static void _sql(Request& r, const Strin | Line 616 static void _sql(Request& r, const Strin |
| statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); | statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); |
| Table_sql_event_handlers handlers(pool, method_name, | Table_sql_event_handlers handlers(pool, method_name, |
| statement_string, statement_cstr); | statement_string, statement_cstr); |
| try { | |
| #ifdef RESOURCES_DEBUG | #ifdef RESOURCES_DEBUG |
| struct timeval mt[2]; | struct timeval mt[2]; |
| //measure:before | //measure:before |
| gettimeofday(&mt[0],NULL); | gettimeofday(&mt[0],NULL); |
| #endif | #endif |
| r.connection(&method_name)->query( | r.connection(&method_name)->query( |
| statement_cstr, offset, limit, | statement_cstr, offset, limit, |
| handlers); | handlers, |
| statement_string); | |
| #ifdef RESOURCES_DEBUG | #ifdef RESOURCES_DEBUG |
| //measure:after connect | //measure:after connect |
| Line 636 static void _sql(Request& r, const Strin | Line 636 static void _sql(Request& r, const Strin |
| r.sql_request_time+=t[1]-t[0]; | r.sql_request_time+=t[1]-t[0]; |
| #endif | #endif |
| } catch(const Exception& e) { // query problem | |
| // more specific source [were url] | |
| throw Exception("sql.execute", | |
| &statement_string, | |
| "%s", e.comment()); | |
| } | |
| Table *result= | Table *result= |
| handlers.table?handlers.table: // query resulted in table? return it | handlers.table?handlers.table: // query resulted in table? return it |