Diff for /parser3/src/classes/table.C between versions 1.262 and 1.265

version 1.262, 2009/07/07 05:47:43 version 1.265, 2009/08/31 08:28:53
Line 17  using namespace std; Line 17  using namespace std;
   
 #include "pa_common.h"  #include "pa_common.h"
 #include "pa_request.h"  #include "pa_request.h"
   #include "pa_charsets.h"
 #include "pa_vtable.h"  #include "pa_vtable.h"
 #include "pa_vint.h"  #include "pa_vint.h"
 #include "pa_sql_connection.h"  #include "pa_sql_connection.h"
Line 26  using namespace std; Line 27  using namespace std;
   
 class MTable: public Methoded {  class MTable: public Methoded {
 public: // VStateless_class  public: // VStateless_class
         Value* create_new_value(Pool&, HashStringValue*) { return new VTable(); }          Value* create_new_value(Pool&) { return new VTable(); }
   
 public:  public:
         MTable();          MTable();
Line 39  public: // Methoded Line 40  public: // Methoded
   
 DECLARE_CLASS_VAR(table, new MTable, 0);  DECLARE_CLASS_VAR(table, new MTable, 0);
   
 // externs  
   
 extern String cycle_data_name;  
   
 #define TABLE_REVERSE_NAME "reverse"  #define TABLE_REVERSE_NAME "reverse"
   
 // globals  // globals
Line 611  static void _offset(Request& r, MethodPa Line 608  static void _offset(Request& r, MethodPa
 }  }
   
 static void _menu(Request& r, MethodParams& params) {  static void _menu(Request& r, MethodParams& params) {
         Temp_hash_value<const String::Body, void*>           InCycle temp(r);
                 cycle_data_setter(r.classes_conf, cycle_data_name, /*any not null flag*/&r);  
   
         Value& body_code=params.as_junction(0, "body must be code");          Value& body_code=params.as_junction(0, "body must be code");
                   
Line 916  static void _sort(Request& r, MethodPara Line 912  static void _sort(Request& r, MethodPara
                 else                  else
                         seq[i].value.d=value.as_double();                          seq[i].value.d=value.as_double();
         }          }
         // sort keys  
           // @todo: handle this elsewhere
           if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) {
                   for(i=0; i<old_count; i++)
                           if(*seq[i].value.c_str)
                                   seq[i].value.c_str=Charset::transcode(seq[i].value.c_str, r.charsets.source(), UTF8_charset).cstr();
           }
   
   // sort keys
         _qsort(seq, old_count, sizeof(Table_seq_item),           _qsort(seq, old_count, sizeof(Table_seq_item), 
                 key_values_are_strings?sort_cmp_string:sort_cmp_double);                  key_values_are_strings?sort_cmp_string:sort_cmp_double);
   

Removed from v.1.262  
changed lines
  Added in v.1.265


E-mail: