--- parser3/src/classes/void.C 2016/10/26 15:44:49 1.54 +++ parser3/src/classes/void.C 2026/04/25 13:38:46 1.61 @@ -1,8 +1,8 @@ /** @file Parser: @b VOID parser class. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "classes.h" @@ -12,11 +12,7 @@ #include "pa_vvoid.h" #include "pa_sql_connection.h" -volatile const char * IDENT_VOID_C="$Id: void.C,v 1.54 2016/10/26 15:44:49 moko Exp $"; - -// externs - -extern String sql_bind_name; +volatile const char * IDENT_VOID_C="$Id: void.C,v 1.61 2026/04/25 13:38:46 moko Exp $"; // class @@ -31,15 +27,11 @@ public: #ifndef DOXYGEN class Void_sql_event_handlers: public SQL_Driver_query_event_handlers { - const String& statement_string; public: - Void_sql_event_handlers(const String& astatement_string): statement_string(astatement_string) {} bool add_column(SQL_Error& /*error*/, const char* /*str*/, size_t /*length*/) { /* ignore */ return false; } bool before_rows(SQL_Error& error) { // there are some result rows, which is wrong - error=SQL_Error(PARSER_RUNTIME, - /*statement_string,*/ - "must return nothing"); + error=SQL_Error("must return nothing"); return true; } bool add_row(SQL_Error& /*error*/) { /* never */ return false; } @@ -74,13 +66,8 @@ static void _sql(Request& r, MethodParam const String& statement_string=r.process_to_string(statement); const char* statement_cstr=statement_string.untaint_cstr(String::L_SQL, r.connection()); - Void_sql_event_handlers handlers(statement_string); - r.connection()->query( - statement_cstr, - placeholders_count, placeholders, - 0, SQL_NO_LIMIT, - handlers, - statement_string); + Void_sql_event_handlers handlers; + r.connection()->query(statement_cstr, placeholders_count, placeholders, 0, SQL_NO_LIMIT, handlers, statement_string); if(bind) unmarshal_bind_updates(*bind, placeholders_count, placeholders);