--- parser3/src/classes/table.C 2003/04/11 15:00:04 1.176 +++ parser3/src/classes/table.C 2003/04/25 12:32:31 1.181 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2003/04/11 15:00:04 $"; +static const char* IDENT_TABLE_C="$Date: 2003/04/25 12:32:31 $"; #include "classes.h" #include "pa_common.h" @@ -77,7 +77,7 @@ static Table::Action_options get_action_ return result; } -static check_option_param(bool options_defined, +static void check_option_param(bool options_defined, const String& method_name, MethodParams *params, int next_param_index, const char *msg) { @@ -381,7 +381,7 @@ static void table_row_to_hash(Array::Ite table=vtable->get_table(); else { // no? creating table of same structure as source - Table::Action_options table_options; + Table::Action_options table_options(0, 0); table=new(pool) Table(pool, *ri.table, table_options/*no rows, just structure*/); ri.hash->put(*key, new(pool) VTable(pool, table)); } @@ -561,8 +561,7 @@ static bool _locate_expression(Table& ta Value& expression_code=params->as_junction(0, "must be expression"); Locate_expression_func_info info={&r, &expression_code}; - table.locate(locate_expression_func, &info, o); - return false; + return table.locate(locate_expression_func, &info, o); } static bool _locate_name_value(Table& table, Table::Action_options o, Request& r, const String& method_name, MethodParams *params) { @@ -637,10 +636,14 @@ static void _join(Request& r, const Stri &method_name, "source and destination are same table"); + if(o.reverse) + throw Exception(0, + &method_name, + "not implemented in this version, please upgrade"); if(const Array *dest_columns=dest.columns()) { // dest is named int saved_src_current=src.current(); int m=src.size()-o.offset; - if(!o.limit || o.limit>m) + if(o.limit<0 || o.limit>m) o.limit=m; int end=o.offset+o.limit; for(int src_row=o.offset; src_row