--- parser3/src/classes/void.C 2002/08/20 09:37:31 1.24 +++ parser3/src/classes/void.C 2002/12/09 12:19:16 1.27 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_VOID_C="$Date: 2002/08/20 09:37:31 $"; +static const char* IDENT_VOID_C="$Date: 2002/12/09 12:19:16 $"; #include "classes.h" #include "pa_request.h" @@ -41,33 +41,34 @@ static void _pos(Request& r, const Strin static void _int(Request& r, const String&, MethodParams *params) { Pool& pool=r.pool(); - VVoid *vvoid=static_cast(r.self); + VVoid *vvoid=static_cast(r.get_self()); r.write_no_lang(*new(pool) VInt(pool, params->size()==0?vvoid->as_int():params->as_int(0, "default must be int", r))); } static void _double(Request& r, const String&, MethodParams *params) { Pool& pool=r.pool(); - VVoid *vvoid=static_cast(r.self); + VVoid *vvoid=static_cast(r.get_self()); r.write_no_lang(*new(pool) VDouble(pool, params->size()==0?vvoid->as_double():params->as_double(0, "default must be double", r))); } #ifndef DOXYGEN -class Void_sql_event_handlers : public SQL_Driver_query_event_handlers { +class Void_sql_event_handlers: public SQL_Driver_query_event_handlers { public: Void_sql_event_handlers(Pool& apool, const String& astatement_string) : pool(apool), statement_string(astatement_string) { } - void add_column(void *ptr, size_t size) { /* ignore */ } - void before_rows() { + bool add_column(SQL_Error& /*error*/, void *ptr, size_t size) { /* ignore */ return false; } + bool before_rows(SQL_Error& error) { // there are some result rows, which is wrong - throw Exception("parser.runtime", + error=SQL_Error("parser.runtime", &statement_string, "must return nothing"); + return true; } - void add_row() { /* never */ } - void add_row_cell(void *ptr, size_t size) { /* never */ } + bool add_row(SQL_Error& /*error*/) { /* never */ return false; } + bool add_row_cell(SQL_Error& /*error*/, void *ptr, size_t size) { /* never */ return false; } private: Pool& pool;