--- parser3/src/classes/table.C 2020/12/30 10:16:53 1.358 +++ parser3/src/classes/table.C 2023/09/26 20:49:06 1.361 @@ -1,8 +1,8 @@ /** @file Parser: @b table parser class. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "pa_config_includes.h" @@ -25,7 +25,7 @@ #include "pa_vbool.h" #include "pa_array.h" -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.358 2020/12/30 10:16:53 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.361 2023/09/26 20:49:06 moko Exp $"; // class @@ -918,7 +918,6 @@ static Table2hash_distint get_distinct(V static void _hash(Request& r, MethodParams& params) { Table& self_table=GET_SELF(r, VTable).table(); VHash& result=*new VHash; - Table::columns_type columns=self_table.columns(); Table2hash_distint distinct=D_ILLEGAL; Table2hash_value_type value_type=C_HASH; @@ -1441,6 +1440,7 @@ static void _columns(Request& r, MethodP } static void _select(Request& r, MethodParams& params) { + InCycle temp(r); Value& vcondition=params.as_expression(0, "condition must be number, bool or expression"); Table& source_table=GET_SELF(r, VTable).table(); @@ -1483,6 +1483,9 @@ static void _select(Request& r, MethodPa bool condition=r.process(vcondition).as_bool(); + if(r.check_skip_break()) + break; + if(condition && ++appended > (size_t)offset) // ...condition is true, adding to the result result_table+=source_table[row]; if(row==0) break; @@ -1493,6 +1496,9 @@ static void _select(Request& r, MethodPa bool condition=r.process(vcondition).as_bool(); + if(r.check_skip_break()) + break; + if(condition && ++appended > (size_t)offset) // ...condition is true, adding to the result result_table+=source_table[row]; }