--- parser3/src/classes/table.C 2003/02/20 14:53:34 1.172.2.10 +++ parser3/src/classes/table.C 2003/03/04 11:51:52 1.172.2.12 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2003/02/20 14:53:34 $"; +static const char* IDENT_TABLE_C="$Date: 2003/03/04 11:51:52 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -32,7 +32,7 @@ public: // Methoded // global variable -MethodedPtr table_class(new MTable); +DECLARE_CLASS_VAR(table, new MTable, 0); // defines for globals @@ -81,6 +81,8 @@ static void get_copy_options(Request& r, if(ValuePtr vlimit=options->get(sql_limit_name)) { valid_options++; limit=r.process_to_value(vlimit)->as_int(); + if(!limit) // zero limit = should be 'nothing to copy', for methods zero means 'all' + limit=-1; // thus fixing } if(valid_options!=options->count()) throw Exception("parser.runtime", @@ -91,8 +93,6 @@ static void get_copy_options(Request& r, method_name, "options must be hash"); } - if(!limit) // zero limit = sould be 'nothing to copy', for methods zero means 'all' - limit=-1; // thus fixing } static void _create(Request& r, StringPtr method_name, MethodParams* params) { @@ -432,6 +432,7 @@ static void _hash(Request& r, StringPtr info.value_fields=&value_fields; info.hash=&result->hash(); info.distinct=distinct; + info.row=0; int saved_current=self_table.current(); self_table.for_each(table_row_to_hash, &info);