Diff for /parser3/src/classes/table.C between versions 1.358 and 1.361

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

Removed from v.1.358  
changed lines
  Added in v.1.361


E-mail: